Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!snorkelwacker!mintaka!olivea!samsung!uakari.primate.wisc.edu!pikes!mercury.cair.du.edu!isis!cbrandau From: cbrandau@isis.cs.du.edu (carl brandauer) Newsgroups: comp.unix.shell Subject: Re: What's set -n for ? Message-ID: <1990Oct19.154246.10555@isis.cs.du.edu> Date: 19 Oct 90 15:42:46 GMT References: <23880001@hpopd.HP.COM> Reply-To: cbrandau@isis.UUCP (carl brandauer) Organization: Math/CS, University of Denver Lines: 13 In article <23880001@hpopd.HP.COM> ian@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.