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.

Praveen Kumar-M
  • 592
  • 5
  • 15

1 Answers1

2

Use the --help flag

set --help 

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

AdminBee
  • 22,803
  • If I do that in Linux Mint, I get bash: set: --: invalid option – AdminBee May 29 '20 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. – Stéphane Chazelas May 29 '20 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. – AdminBee May 29 '20 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. – schily May 29 '20 at 15:52