🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1541

Re: What's set -n for ?

#1541
From: carl brandauer
Date: Fri, 19 Oct 1990 15:42
13 lines
1000 bytes
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.
Technical Details
Message-ID: <1990Oct19.154246.10555@isis.cs.du.edu>
Path: arc1-ca.pugleaf.net!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
References: <23880001@hpopd.HP.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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