The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
scripting problem manojrsb Shell Programming and Scripting 0 03-01-2009 06:20 AM
scripting problem msbinu UNIX for Advanced & Expert Users 3 12-08-2006 02:24 AM
scripting problem SirGreed UNIX for Dummies Questions & Answers 3 02-19-2004 11:52 AM
Scripting problem Robin Shell Programming and Scripting 2 03-14-2003 05:45 AM
awk scripting problem jinky Shell Programming and Scripting 2 05-15-2002 11:15 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-23-2009
Knowledge_Xfer Knowledge_Xfer is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 9
Scripting Problem

Hi,

I would like to ask for your help. You see i created a script that runs based on user input.

Upon running i encountered an error saying
"ksh: syntax error: `else' unmatched".

I am quite new to UNIX and to scripting as well.

below is my script which created to do this:

#! /bin/ksh
value1=’Hi’
value2=’Hello’
echo 'Enter Value'
read Greeting1orGreeting2
if [ $HiorHello = 'Greeting1' ]
then
echo $value1
else
if [ $HiorHello = 'Greeting2' ]
then
echo $value2
else
if [ $HiorHello = 'Exit' ]
then
echo `date "+%Y/%m/%d"`$
fi

Thanks for your time
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:32 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0