>    > No no no.  Look at this:
   >    > 
   >    > arianna% test -e /; echo $?
   >    > test: argument expected
   >    > -1
   >    
   >    Excuse me if I'm wrong, but the prompt looks suspiciously like a
   >    csh prompt.  Please make sure to run /bin/sh and test there.
   > 
   > You are right, but nothing changes:
   > 
   > $ test -e /; echo $?             <--- here is the problem
   > test: argument expected
   
   What do you mean by `nothing changes'?

Ehr.  We have a communication problem :-)
   
   I said that /bin/sh isn't executing the second command on this line
   (the echo command), and that's correct.
   
The first example I gave is wrong (and in fact I said you were right).

   tcsh was executing the second command, it was printing "-1".

Yes, this was in the first (wrong) example I gave).
   
   The thing to try is to send `test -e /' as one command, and then `echo
   $?' as another.

I do that in the following, but my second example above proves that the
problem is still there.  Here is one more test case:

arianna% exec /bin/sh
$ 
$ # Ok, now this is a Bourne shell.  This is a proof:
$ a=b
$ export a
$ echo $a
b
$ test -e /
test: argument expected
$ echo $?
1
$ test -e /; echo $?
test: argument expected
$ type test
test is a shell builtin
$ /bin/test -e /; echo $?
0
$ /usr/bin/test -e /; echo $?
0
$ /bin/test --version
$ /usr/bin/test --version
$

Reply via email to