Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Test for Unused Variable 1

Status
Not open for further replies.

Michael42

Programmer
Oct 8, 2001
1,454
US
Hello,

In a Bourne shell script running on Solaris 8 I want to be able to test if a user definable variable has a value.

Example Var Init Section:
Code:
FILE_DEST1=/u06/data
FILE_DEST2=/u07/data
FILE_DEST3=

Given the above how can I detect that FILE_DEST3 has no value?

Thanks,

Michael42
 


if [ -z $FILE_DEST3 ]; then ... [3eyes]

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top