Quantcast
Channel: csh: how to test for blank correctly? - Super User
Viewing all articles
Browse latest Browse all 2

Answer by e40 for csh: how to test for blank correctly?

$
0
0

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.


Viewing all articles
Browse latest Browse all 2

Trending Articles