Path: utzoo!utgpu!cunews!bnrgate!bwdls61.bnr.ca!bwdls58!!stetner From: stetner@.bnr.ca (Douglas Stetner) Newsgroups: comp.unix.programmer Subject: Re: IF syntax Message-ID: <4887@bwdls58.UUCP> Date: 14 Nov 90 22:18:06 GMT References: <15796@brahms.udel.edu> Sender: news@bwdls58.UUCP Reply-To: stetner@bwdlh507.bnr.ca (Douglas Stetner) Organization: Bell-Northern Research, Ltd. Lines: 30 In article <15796@brahms.udel.edu> jon@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@bnr.ca | P.O. Box 3511, Stn. C | (613) 828-6321 (home) ..!uunet!bnrgate!stetner | Ottawa, ON, CANADA | (613) 763-8396 (work)