Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

status codes on Dec OSF



The following script produces different results when run on a dec machine vs
a solaris machine. It seems the dec doesn't see the status code of the command
if your setting the output to a varible.

%cat foo
FOO=`jfkljfs`
echo $?
FOO=`pwd`
echo $?

jfkljfs
echo $?
pwd
echo $?


>From the dec 4.0F machine
% /opt/bcs/packages/zsh-4.0.1/bin/zsh -x foo
+foo:1> FOO=+foo:1> jfkljfs
foo:1: command not found: jfkljfs
+foo:1> FOO=
+foo:2> echo 0
0
+foo:3> FOO=+foo:3> pwd
+foo:3> FOO=/usr/users/harvell/zsh-4.0.1
+foo:4> echo 0
0
+foo:6> jfkljfs
foo:6: command not found: jfkljfs
+foo:7> echo 1
1
+foo:8> pwd
/usr/users/harvell/zsh-4.0.1
+foo:9> echo 0
0

>From the solaris 2.7 machine
% /opt/bcs/packages/zsh-4.0.1/bin/zsh -x foo
+foo:1> FOO=+foo:1> jfkljfs
foo:1: command not found: jfkljfs
+foo:1> FOO=
+foo:2> echo 1
1
+foo:3> FOO=+foo:3> pwd
+foo:3> FOO=/data/cvs/bcs/SOURCES/zsh-4.0.1
+foo:4> echo 0
0
+foo:6> jfkljfs
foo:6: command not found: jfkljfs
+foo:7> echo 1
1
+foo:8> pwd
/data/cvs/web-inf/bcs/SOURCES/zsh-4.0.1
+foo:9> echo 0
0



-- 

Brian Harvell                harvell@xxxxxxx             http://ToolBoy.com/
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq'|dc






Messages sorted by: Reverse Date, Date, Thread, Author