🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #1219

Re: IF syntax

#1219
From: Paul Harsha
Date: Wed, 14 Nov 1990 18:39
26 lines
689 bytes
jon@brahms.udel.edu (Jon Deutsch) writes:



>#!/bin/sh
>if [$temp != '']  then
>        echo 'remote-caller' >> .people;
>else
>	echo 'inside-caller' >> .people;
>fi

>I keep getting an ELSE UNEXPECTED.  

You need to put the "then" on a seperate line

#!/bin/sh
if [$temp != '']  
then
        echo 'remote-caller' >> .people;
else
        echo 'inside-caller' >> .people;
fi

works just fine.

-Paul
Technical Details
Message-ID: <965@ksr.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ksr!harsha
References: <15796@brahms.udel.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ksr!harsha
From: harsha@ksr.com (Paul Harsha)
Newsgroups: comp.unix.programmer
Subject: Re: IF syntax
Message-ID: <965@ksr.com>
Date: 14 Nov 90 18:39:40 GMT
References: <15796@brahms.udel.edu>
Sender: news@ksr.com
Lines: 26