Test.sh: ========================================================================== #!/bin/sh cd /home/paul cat testing return $? ========================================================================== paul@shuttle-linux:~$ ./test.sh; echo $? cat: testing: No such file or directory 1 paul@shuttle-linux:~$ touch testing && ./test.sh; echo $? 0