Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2011
    Posts
    11

    Unanswered: 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

  2. #2
    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 ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •