Thread
:
changing dir
View Single Post
#
2
(
permalink
)
03-28-2006, 06:42 PM
tom
Contributors
User
Join Date: Jun 2005
Location: London, UK
Posts: 213
Rep Power:
4
You are using == operator which is for string comparison and not for number comparison. Use –eq for equal to. In short,
Code:
if [ $choice -eq 0 ]; then cd /home/0 elif [ $choice -eq 1 ]; then cd /home/1 else echo "Etc etc" fi
tom
View Public Profile
Find all posts by tom