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'.
[root@geodollar /root]# cat > /tmp/tmpscript
echo "hello"
echobad
[root@geodollar /root]# bash -c "set -n /tmp/tmpscript" # line 2
[root@geodollar /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