What's set -n for ?
carl brandauer
cbrandau at isis.cs.du.edu
Sat Oct 20 01:42:46 AEST 1990
In article <23880001 at hpopd.HP.COM> ian at hpopd.HP.COM (Ian Watson) writes:
>What's the point of the -n option for the 'set' command of sh ?
>
> -n Reads commands but does not execute them
>
>If you have set it, how would you ever unset it ?
When writing shell scripts, 'set -n' is useful for detecting syntax
errors without risking the dangers that might occur if every command were
executed.
If you set -n on the command line, logging off is the only way to unset
it.
More information about the Comp.unix.shell
mailing list