Date: Sat, 29 Apr 2006 02:42:02 +0300 From: "N. Ersen SISECI" <siseci@gmail.com> To: "Martin McCormick" <martin@dc.cis.okstate.edu> Cc: freebsd-questions@freebsd.org Subject: Re: Bourn Shell -n Flag Questions Message-ID: <848f55ff0604281642i1262ffc9w499dbd217590f590@mail.gmail.com> In-Reply-To: <200604281634.k3SGYNhn093282@dc.cis.okstate.edu> References: <200604281634.k3SGYNhn093282@dc.cis.okstate.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello, Bourne shell is bash. So you should try bash -n scriptname -- N. Ersen SISECI http://www.enderunix.org On 4/28/06, Martin McCormick <martin@dc.cis.okstate.edu> wrote: > I read about the noexecute flag or -n flag which is supposed > to check the syntax of a Bourn Shell script to see what it would do if > run, but not actually do anything. This sounds like a wonderful > thing, especially when one is going to run a dangerous script and you > only get one chance to get it right. > > I tried sh -n scriptname and it always silently succeeds even > if I type sh -x -n somescript. I even deliberately created a script > with a syntax error in it and tried sh -x -n again. It still did > nothing but exit. Does this just not work or am I misunderstanding > the purpose of the flag? > > Thanks for your help. > > Martin McCormick WB5AGZ Stillwater, OK > Systems Engineer > OSU Information Technology Department Network Operations Group > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?848f55ff0604281642i1262ffc9w499dbd217590f590>