BASH Programming: spaces ignored
sean_at_mail.capitalgenomix.com
Date: 05/30/05
- Next message: shakahshakah_at_gmail.com: "Re: BASH Programming: spaces ignored"
- Previous message: Casper H.S. ***: "Re: getting pathname from descriptor"
- Next in thread: shakahshakah_at_gmail.com: "Re: BASH Programming: spaces ignored"
- Reply: shakahshakah_at_gmail.com: "Re: BASH Programming: spaces ignored"
- Reply: Paul Pluzhnikov: "Re: BASH Programming: spaces ignored"
- Reply: Hartmut Holzgraefe: "Re: BASH Programming: spaces ignored"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 30 May 2005 14:45:25 GMT
I'm having difficulty with a BASH script that I'm attempting to write.
I'm attempting to change directories to a path with a space in the name
and it appears that the spaces are being dropped. Following is the
script:
#!/bin/bash
fileserver_path="/mnt/fs/Documents/DS\ -\ Datasheets/"
cd $fileserver_path
if [ "$?" != "0" ]; then
echo Cannot locate $fileserver_path
exit 1
fi
The following error occurs with this script:
./script: line 4: cd: /mnt/fs/Documents/DS\: No such file or directory
As you can see, the spaces are being ignored. I've tried everything I
could think of to get it to stop ignoring the spaces; however, I've been
quite unsuccessful.
Can anybody please give me some advise? I'm quite new to BASH
programming so it's quite possible that I'm going about this the wrong
way. If I am, feel free to provide any advise.
Thank you advance,
-- Sean
- Next message: shakahshakah_at_gmail.com: "Re: BASH Programming: spaces ignored"
- Previous message: Casper H.S. ***: "Re: getting pathname from descriptor"
- Next in thread: shakahshakah_at_gmail.com: "Re: BASH Programming: spaces ignored"
- Reply: shakahshakah_at_gmail.com: "Re: BASH Programming: spaces ignored"
- Reply: Paul Pluzhnikov: "Re: BASH Programming: spaces ignored"
- Reply: Hartmut Holzgraefe: "Re: BASH Programming: spaces ignored"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]