> term% ifs='\n' for(i in Plan*){cp $i `{echo $i | sed 's/lan/LAN/'}}
> cp: can't create PLAN 9
> : bad character in file name: 'PLAN 9
> '
> cp: can't create PLAN B
> : bad character in file name: 'PLAN B
> '
> '

> So the last newline character is added to the file name...

> I tried typing a literal newline in the ifs variable and it works:

> term% ifs='
> ' for(i in Plan*){cp $i `{echo $i | sed 's/lan/LAN/'}}
> term% ls P*
> 'PLAN 9'
> 'PLAN B'
> 'Plan 9'
> 'Plan B'

> With p9p is the same.  I'll appreciate If anyone can tell me why.

rc doesn't do backslash escapes.

tristan

-- 
All original matter is hereby placed immediately under the public domain.

Reply via email to