!$ works with `` but not $()

Bug #791263 reported by Ralph Corderoy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: bash

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.

Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

bash's upstream maintainer Chet Ramey confirms the bug and says it will be fixed in the next release. http://lists.gnu.org/archive/html/bug-bash/2011-06/msg00003.html

Changed in bash (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.