IF I have to check that if a variable is empty or not for that in bash shell i can check with the following script:
if [ -z \"$1\" ]
then
echo \"variabl
You can try this (found here):
set name
if ( ${%name} == 0 ) then
echo " Variable name has 0 characters as value."
endif
Note that the person who posted this has the following signature:
Standard advice: avoid csh family for scripting.
Note: This will break if name is an environment variable.
setenv name foobar ; set name ; echo '+++'$name'+++' ; unset name ; echo '==='$name'==='
++++++
===foobar===