Friday, December 1, 2017

csh vs. tcsh status

Posted on 


Jim, it is apparently a csh'ism that $? is not available but $status is:

Randws035:csh
[randws035/vobs/rnc/rrt/rlib] ls /non/existant
/non/existant: No such file or directory
[randws035/vobs/rnc/rrt/rlib] echo $status
2
[randws035/vobs/rnc/rrt/rlib] ls /non/existant
/non/existant: No such file or directory
[randws035/vobs/rnc/rrt/rlib] echo $?
Variable syntax
Whereas in tcsh:
Randws035:tcsh
[randws035/vobs/rnc/rrt/rlib] ls /non/existant
/non/existant: No such file or directory
[randws035/vobs/rnc/rrt/rlib] echo $status
2
[randws035/vobs/rnc/rrt/rlib] ls /non/existant
/non/existant: No such file or directory
[randws035/vobs/rnc/rrt/rlib] echo $?
2

No comments:

Post a Comment

Posted on  November 23, 2005 Continued to help several users with connecting to the new Controller Clearquest Database for Vinh...