using read to enter the input at runtime

Hi
I am stucked in the below script .I want to input with yes/no from the user and then execute the code inside if but it is not working .I just need the logic as where I am wrong so that i can use the same in my work .

[#!/bin/ksh
read value
if[ "$value" -eq 'Y' ]
then
  echo "Hi All"
fi

].

Please suugest .

eq is used for integer comparisons, use = for string comparisons:

if [ "$value" = "Y" ]

instead of:

if[ "$value" -eq 'Y' ]

hi Franklin52
I triedthe below thing , it is not working .

#!/bin/ksh
read value
if [ "$value" = Y ]
then
  echo Hi All
fi

It works.

#!/bin/ksh
read value
if [ $value = y -o $value = Y ]
then
  echo Hi All
fi

It works fine