Thread: changing dir
View Single Post

  #6 (permalink)  
Old 03-28-2006, 08:45 PM
monk's Avatar
monk monk is offline
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 482
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
Default

Replace
Code:
if [ $choice -eq 0 ] ; then cd
   /home/sparky/backup
With one line:
Code:
if [ $choice -eq 0 ] ; then cd /home/sparky/backup
If you type command /home/sparky/backup at a shell prompt you will always get error:
bash: /home/sparky/backup: is a directory

Same with shell script so just put it on one line.
Reply With Quote