luiscolorado <[EMAIL PROTECTED]> wrote:
> This is what I get when some file names have spaces:
>
> for i in `my-program`
> do
> echo $i
> done
>
> It echoes the following:
>
> sony
> apple
> hewlett 
> packard

Unquoted `` expansions are split into words using $IFS.  So if you
only want to split on newlines:
old_ifs="$IFS"
IFS='
'
for i in `my-program`; do ...; done
IFS="$old_ifs"


paul


Reply via email to