Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> Anyone KNOW unix?, Ignore now
United Kingdom
hazmeister
Posted: Dec 12 2007, 07:40 PM
Quote Post


ITT CATZ!!!
[*]

Group Icon
Group: Members
Posts: 1425
Member No.: 3802
Joined: 21-May 07

Status: (0d) [--]


I can't this stupidly simple if statement to work!

#!/bin/ksh
echo "Input either 1 or 2"
read Num
if [$Num -eq 1 ]; then
echo "Message 1"
if [$Num -eq 2 ]; then
echo "Message 2"
else
echo "false"
fi

$ ksh decisions
Input either 1 or 2
2
decisions[4]: syntax error at line 4 : `then' unmatched

This post has been edited by hazmeister on Dec 12 2007, 08:18 PM


--------------------
PMEmail PosterUsers WebsiteMSN
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0289 ]   [ 14 queries used ]   [ GZIP Enabled ]   [ Server Load: 3.60 ]