|
From: | Yang Zhang |
Subject: | Re: Quick question: mv !(file) !$ |
Date: | Tue, 13 Jan 2009 04:34:15 -0500 |
User-agent: | Thunderbird 2.0.0.19 (X11/20090105) |
Chet Ramey wrote:
Yang Zhang wrote:Hi, why doesn't the second command work? (Trying to move all files into a newly created directory.) $ mkdir dhclient $ mv !(dhclient) !$ bash: !: event not foundIt doesn't work because enabling the `extglob' option doesn't cause bash to tell the history library to not attempt history expansion when it sees the history expansion character followed by a `('. This will be fixed in bash-4.0 or soon after. Chet
So it's failing on the first bang? But there is no problem once I replace !$ with 'dhclient' - usually extglob seems to work fine with the suppression of history expansion. Or does the presence of !$ somehow trigger history expansion (normally not run) which then attempts to history-expand everything?
-- Yang Zhang http://www.mit.edu/~y_z/
[Prev in Thread] | Current Thread | [Next in Thread] |