↧
Answer by e40 for csh: how to test for blank correctly?
Use if ( "x$R" == "x" ) then echo empty else echo not empty endif The C shell doesn't have an empty operator like bash. Also, you can't quote with ' as it will prevent the variable expansion.
View Articlecsh: how to test for blank correctly?
I want to test if a variable is totally empty in csh. set R='dddd aaa' if ( '${R}' ) then echo not empty else echo 1111 endif However it apparently does not work. It gives this error message:...
View Article
More Pages to Explore .....