It seems the Bash built-in help command help
does some really strange globbing:
help read
shows the documentation forread
,readarray
andreadonly
.help rea?
shows only the documentation forread
.help 'read$'
doesn't work.help read | sed '/^read[^:]\+/,$d'
is just silly.
Is there some more intuitive way to get only the read
output?
Best Answer
It seems by defaul
help foo
is actually equivalent tohelp foo*
. But if some special globbing characters are used then the ending "*
" is not implicitely added.So, a possibility would be
help [r]ead
.The globbing used is the one used by the shell for file matching; afaik there isn't any equivalent of
\<
nor\>
.