Hi,
i'm writing a script in tcsh, and i need to check to see whether a string is empty. i think sh users use the -z function for this, but i'm using it already to check for the emptiness of a file -- surely it's not the same function for both, is it?
is there another one to check for string emptiness, or am i wrong in using it to check for file emptiness?
here a short sniplet of what i've written (which of course doesn't work):
Code:
echo "checking length of nmlfilelist"
if( $nmlfilelist == "" ) then
echo "nmllist is empty"
exit( 1 )
endif
this raises a syntax error, which i can retrospectively understand. how should it look like?
thx in advance,
Pagod