From owner-freebsd-questions@FreeBSD.ORG Fri Apr 28 23:42:03 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D6FC016A402 for ; Fri, 28 Apr 2006 23:42:03 +0000 (UTC) (envelope-from siseci@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63DCB43D46 for ; Fri, 28 Apr 2006 23:42:03 +0000 (GMT) (envelope-from siseci@gmail.com) Received: by nz-out-0102.google.com with SMTP id 34so1953144nzf for ; Fri, 28 Apr 2006 16:42:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Knfuu7Sc4YSkeYUZC5DkfGBWsYwlqXW1mQdItbJjMb6B0MkdueKcHvlydf5701YCeESKNmJfIRy5Fg970b1nzE8g4Qmc6MV+7SA+Spm00iJqKL4cEcMKzzq7wiPM9hq08Sc04KaznND7nMZ4GNa4nEYjDaXobvO0DP5awgWNNH0= Received: by 10.65.249.16 with SMTP id b16mr440913qbs; Fri, 28 Apr 2006 16:42:02 -0700 (PDT) Received: by 10.65.244.15 with HTTP; Fri, 28 Apr 2006 16:42:02 -0700 (PDT) Message-ID: <848f55ff0604281642i1262ffc9w499dbd217590f590@mail.gmail.com> Date: Sat, 29 Apr 2006 02:42:02 +0300 From: "N. Ersen SISECI" To: "Martin McCormick" In-Reply-To: <200604281634.k3SGYNhn093282@dc.cis.okstate.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200604281634.k3SGYNhn093282@dc.cis.okstate.edu> Cc: freebsd-questions@freebsd.org Subject: Re: Bourn Shell -n Flag Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 23:42:03 -0000 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 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" >