If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > simple shell script - wrong output

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-07-11, 07:05
jason_bourne jason_bourne is offline
Registered User
 
Join Date: Aug 2011
Posts: 11
simple shell script - wrong output

This is the script which I am trying to execute :


#!/bin/sh

VALUE="abcd"

echo "Please enter the value"
read VALUE1

if [ "$VALUE1" == "$VALUE " ]; then

echo "Correct"

else

echo "incorrect"
fi


after i execute and whenever i am putting any value also "abcd" I am always getting output as incorrect....can you plz help
Reply With Quote
  #2 (permalink)  
Old 08-07-11, 07:23
jason_bourne jason_bourne is offline
Registered User
 
Join Date: Aug 2011
Posts: 11
Reply

Sorry, I got the answer......I gave a space after value..... Kindly ignore . i need to delete this thread....Can you tell me how ?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On