set and shopt are both shell builtins that control various options. I often forget which options are set by which command, and occasionally which option sets/unsets (set +o/-o, shopt -s/-u). Why are there two different commands that seemingly do the same thing (and have different arguments to do so)? Is there any easy way/mnemonic to remember which options go with which command?
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|
|||
|
As far as I know, the |
|||
|
|
|
It looks like "set" options are inherited by subshells and shopts are not. |
|||
help setandhelp shoptto verify that even their authors think they do the same thing. – l0b0 Feb 22 '12 at 16:28