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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if syntax error

Status
Not open for further replies.

madra

MIS
Feb 12, 2003
95
GB
I need to resolve the if check as the field contains two values, and is causing a syntax error.

A noddy test script was set up and your help is appreciated

thanks

madra

The script:
#!/bin/ksh

BLAH="12345 67890"

if [[ BLAH -eq "" ]]
then
echo "oh no not me"
else
echo "no its me"
fi


the error:
dunsdev:/usr/local/getronics/bin # ./dogtest.ksh
./dogtest.ksh[5]: 12345 67890: 0403-057 Syntax error



I only ask stupid questions because I'm thick
 
Hi

Code:
[b]if[/b] [teal][[[/teal] [green][i][highlight]"$[/highlight]BLAH[highlight]"[/highlight][/i][/green] [teal][highlight]==[/highlight][/teal] [green][i]""[/i][/green] [teal]]][/teal]

Feherke.
 
thanks to both for your quick responses
$BLAH == did the trick


I only ask stupid questions because I'm thick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top