From owner-freebsd-questions Fri Aug 24 16: 3:27 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-94-248-46.mmcable.com [24.94.248.46]) by hub.freebsd.org (Postfix) with SMTP id 2CCA737B407 for ; Fri, 24 Aug 2001 16:03:24 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 53289 invoked by uid 100); 24 Aug 2001 23:03:22 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15238.56634.556417.593462@guru.mired.org> Date: Fri, 24 Aug 2001 18:03:22 -0500 To: Tony Cc: questions@freebsd.org Subject: Re: how to run a shell script but not execute In-Reply-To: <66986334@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Tony types: > I have a shell script that I want to see what it is gonning execute. > I tried the -n as in the man page. > What I think my problem I do not know how to supply the shell script as > input > > sh -n script > sh -n < script > > both do show anything. I take it you mean "not show anything". Of course not - you didn't ask it to. The debugging output flags are -v and -x. -v echos the input as it is read, which is what you want in this case. -x echos the commands before they are executed. With -n, it does nothing, presumably because no commands are executed. > There must have been something I missed to echo the commands but I cannot > find it. Both -v and -x are listed on the sh man page. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message