I'm working on a simple bash script and no matter what the user inputs as choice, the result of the first condition is always printed. Can someone explain what's going on here? On side note, how do you go about debugging a bash script like this? When I try debugging in ecplise using the shell script plugin, the only option is an "ant build" which, when I try it, does nothing arrgggh!
if [ -f $1 ]
then
echo "Are you sure you want to delete $1? Y for yes, N for no"
read choice
if [ $choice="Y" ]
then
echo "okay"
else
echo "file was not deleted"
fi
fi