[NCLUG] csh to bash question
Mark C. Smith
markcs at CS.ColoState.EDU
Tue Feb 27 08:11:19 MST 2001
On Feb 26, 2001, S. Luke Jones wrote the following with Subject "Re:...:
->"Mark C. Smith" wrote:
->> from csh to bash. I have no idea what it does as the
->> $? always screws me up. Any help is mucho appreciated.
->
->${?var} returns 1 if var is set, 0 otherwise
->$?0 return 1 if input filename is known, 0 otherwise
->
->so my guess is that this is csh-speak for
->
->if [ -z "$MPIRUN_DEVICE" ]
->then
-> exit
->fi
->
->or, more succinctly
->
->test -z "$MPIRUN_DEVICE" && exit
->test -n "$MPIRUN_DEVICE" || exit
->
->(I eschew the "[ test ] && whatever" syntax you see so much.)
->
->See also Tom Christiansen's famous diatribe on the subject:
->
->http://www.landfield.com/faqs/unix-faq/shell/csh-whynot/
->_______________________________________________
->NCLUG mailing list
->NCLUG at nclug.org
->http://www.nclug.org/mailman/listinfo/nclug
->
Cool, thanks. I'll give that a shot and let you know how it works.
Thanks for the help.
Mark
More information about the NCLUG
mailing list