--- Simon Matthews <simon.d.matthews@gmail.com> wrote:
> Interesting point, but the most common Linux filesystem (ext2/ext3)
> can
> certainly work with filenames that contain spaces. It is just that
> they are
> difficult to use, so are not nomally used. They can also break
> scripts that are usually written assuming no spaces in the
filenames.
And that of course is because white space is considered a
break between variables.
If you write:
cd /tmp
DIRNAME="My Home Directory"
for i in $DIRNAME
do
cd $i
pwd
done
You'll get:
bash: cd: My: No such file or directory
/tmp
bash: cd: Home: No such file or directory
/tmp
bash: cd: Directory: No such file or directory
/tmp
That's no way to run a variable! :-)
David Breneman david_breneman@yahoo.com
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
|