IF syntax
Douglas Stetner
stetner at .bnr.ca
Thu Nov 15 09:18:06 AEST 1990
In article <15796 at brahms.udel.edu> jon at brahms.udel.edu (Jon Deutsch) writes:
>
>OK, second try at the question:
>
>I'm using sh to impliment an IF statement. Can't get it to work.
>Here's the code:
>
>
>#!/bin/sh
>if [$temp != ''] then
> echo 'remote-caller' >> .people;
>else
> echo 'inside-caller' >> .people;
>fi
>
Try (note quotes and spaces):
#!/bin/sh
if [ "$temp" != "" ]
then
echo 'remote-caller' >> .people;
else
echo 'inside-caller' >> .people;
fi
--
--------------------------------------------------------------------------------
Douglas G. Stetner, 4S75 | Bell-Northern Research | My opinions are my own.
stetner at bnr.ca | P.O. Box 3511, Stn. C | (613) 828-6321 (home)
..!uunet!bnrgate!stetner | Ottawa, ON, CANADA | (613) 763-8396 (work)
More information about the Comp.unix.programmer
mailing list