2012/3/21 Peter A. Cejchan <[email protected]>: > for (old in `{9 ls *.$EXT}) {
Here you are iterating over the elements of `{9 ls *.$EXT}, sepparated
by $ifs. Therefore, spaces are breaking your lines into word fields.
This is not what you want.
Your second example directly process whole lines (uses sed), so it
works. I think you will get what you want if you replace this line
with:
ifs='
' for (old in `{9 ls *.$EXT}) {
--
- yiyus || JGL .
