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!

Check var for number of files

Status
Not open for further replies.

sumncguy

IS-IT--Management
May 22, 2006
118
US
I left my keys at home and cant get to my Unix in a nutshell book.

How can I check a var for two elememts

ie

var="car boat" or var="car"

if [ $var has two elements ]
then
echo "got 2"
fi



Thanks


 

Yeah ok dat will work ....

yeah the other is something line ${#var} ... sumtimers is kicking in :)

Tks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top