bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: for command doesn't handle spaces in filename well!


From: Paul Jarc
Subject: Re: for command doesn't handle spaces in filename well!
Date: Tue, 26 Nov 2002 15:47:37 -0500
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu)

"Alex" <address@hidden> wrote:
> echo HELLO>"HELLO  THERE"
> echo HI   >"HI     THERE"
> for f in H*; do echo $f;done
>
> Resulting Output:
> HELLO THERE
> HI THERE

This is the correct behavior, and it has nothing to do with "for".  It
has to do with unquoted variable expansion.  If you want to preserve
the spaces, use "$f" instead of $f.


paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]