[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set -n ruins shell

From: Paul Jarc
Subject: Re: set -n ruins shell
Date: Wed, 19 Sep 2001 19:40:38 -0400
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7

George Herson <address@hidden> wrote:
> Thanks, but why am i still getting zero output?
> address@hidden /root]# bash -c 'set -n; . /tmp/tmpscript'
> address@hidden /root]# chmod u+x /tmp/tmpscript
> address@hidden /root]# bash -n /tmp/tmpscript
> address@hidden /root]#

Because with -n, the commands aren't executed.  So bash doesn't notice
if a command doesn't exist.

> Should i try a "real" syntax error?  like what?

That should produce an error message.  Try this:
echo (hello


reply via email to

[Prev in Thread] Current Thread [Next in Thread]