On 6/1/11 9:31 AM, Ralph Corderoy wrote: > Report follows. > > https://bugs.launchpad.net/ubuntu/+source/bash/+bug/791263 > > This is on 10.04 and also with upstream's pure bash 4.2 with no Debian > or Ubuntu patches. > > $ echo bar >foo > $ >bar > $ ls `cat foo` > bar > $ wc !$ > wc `cat foo` > 0 0 0 bar > $ ls $(cat foo) > bar > $ wc !$ > wc ) > -bash: syntax error near unexpected token `)' > $ ls $(<foo) > bar > $ wc !$ > wc ) > -bash: syntax error near unexpected token `)' > $ > > I'd expect !$ to consider the last word to be $(...) just as it is happy > with `...`. zsh does.
Thanks for the report. This will be fixed for the next version of bash. In addition to $(...), process substitution and extended globbing patterns will work as well. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/