0

I am using bash

I wanted to read the documentation of set

But when i typed man set,it is showing

No manual entry for set 

But when i code

set hit="COVID19" echo $1 

it prints as

hit=COVID19 

How to find and add the man page of set inside the current man pages.

0

1 Answer 1

2

Use the --help flag

set --help 

This is a nice link as well: Linux set and unset commands

4
  • If I do that in Linux Mint, I get bash: set: --: invalid option Commented May 29, 2020 at 15:42
  • @AdminBee, set --help would only work in ksh93 and recent versions of bash (4.4+). With older bash, help set would work better. See also info bash set (or info zsh set for zsh's set builtin), and set --man (or set --nroff 2>&1 | man -l -) in ksh93. Commented May 29, 2020 at 15:43
  • @StéphaneChazelas thank you, that's good to know (seriously). Still, it was originally meant as a caveat to this answer, and it may be worth including that information in the post. Commented May 29, 2020 at 15:45
  • You are observing a typical Linux problem. man set works on a typical UNIX system. That man page however does not include information on the bash builtin command but just for the default shells. Commented May 29, 2020 at 15:52

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.