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!

"" question 2

Status
Not open for further replies.

BIS

Technical User
Jun 1, 2001
1,893
NL
Hallo,

Perhaps a simple one, but I could do with a pointer here.
I am trying to match the string "something" including the "'s.

if [ "$variable" = ""something""]
then
exec something
else
something else
fi

But I keep getting "Too many arguments" error. Is there a simple way to match the "something" , including the ""s
 
[blush]

I must have been asleep....

Many thanks for your help. The star is for the fact that you helped me, not for the rocket science you provided.
 
Another way:[tt]
if [ "$variable" = '"something"'][/tt]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top