The return value for the shell command is usually not obtained this way. Usually you need to run the command, then a special environment variable $?will give you the return value.
Refer to the following entry for tcsh:
pax$ which qq ; echo $?
qq: Command not found.
1
pax$ which ls ; echo $?
/bin/ls
0
Just put any command you want to check where I have lsabove.
source
share