[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ubuntu [Bug 791263] !$ works with `` but not $()
From: |
Chet Ramey |
Subject: |
Re: Ubuntu [Bug 791263] !$ works with `` but not $() |
Date: |
Wed, 01 Jun 2011 21:33:11 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 |
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 address@hidden http://cnswww.cns.cwru.edu/~chet/