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

Re: bash scripts misrepresenting white space



On Thu, Dec 25, 2003 at 07:44:16PM -0500, Johann Koenig wrote:
> I try, for example:
> for i in `ls`
> do
> echo $i
> done

You want:

    for i in *
    do
        echo "$i"
    done

which will do what you probably want.  I'd suggest consulting the Bash
info manual which should tell you what you need to know about quoting.

Simon



Reply to: