bug-bash
[Top][All Lists]
Advanced

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

Re: set -n ruins shell


From: George Herson
Subject: Re: set -n ruins shell
Date: Wed, 19 Sep 2001 17:37:09 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010701

Chet Ramey wrote:

The man bash page does say set -n is ignored by interactive shells. (On page 74, if printed out.)


Well, that's a bug somewhere.


How can i use set -n to check scripts?  It fails with a script argument.


`bash -n scriptname'


Has the same problem as when I run w/o an argument, as i've said twice before.



man bash, p3, talks about how to get a login shell and an interactive one but not how to get a noninteractive shell.


A non-interactive shell is one started to run a script or `-c command'.


address@hidden /root]# cat > /tmp/tmpscript
echo "hello"
echobad
address@hidden /root]# bash -c "set -n /tmp/tmpscript"  # line 2
address@hidden /root]# echobad
bash: echobad: command not found



tmpscript has a syntax error so why didn't I get any output from line 2?

thx,
george




reply via email to

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