11 Aug
2004
11 Aug
'04
13:14
dries wrote:
Hello all,, ,
I've made tcsh script that uses a environment variable that can be defined or not, the script works, but if the variable is not defined i get the message 'carrotcount: Undefined variable.'
from the example script below . . .
#!/usr/bin/tcsh echo $carrotcount
My question is : is there a way to suppress the 'undefined variable' message or can i check wether it is defined (in a tcsh script) . .
Grtz Dries Pruimboom
man tcsh on my SuSE 8.2 turned up this under the "Variables" section : . . . . The following substitutions can not be modified with `:' modifiers. $?name ${?name} Substitutes the string `1' if name is set, `0' if it is not. HTH, YMMV, & all that.