The following was just posted to the Seattle Linux List. I don't get it (either one). Can someone explain? Ted. -----FW: <20080214183909.GX3016@zen>----- Date: Thu, 14 Feb 2008 10:39:09 -0800 Sender: linux-list-bounces@lists2.linuxjournal.com From: Glenn Stone <technoshaman@liawol.org> To: linux-list@lists.linuxjournal.com Subject: Re: [SLL] Linux Roulette: On Thu, Feb 14, 2008 at 10:31:29AM -0800, Xeno Campanoli wrote:
!rm
Took me a second to get that one. Yeah, that's shooting blind, for sure... Although one could say !rm:p to make sure... -- Glenn "Be sure you are right -- THEN GO AHEAD!" -- Davy Crockett, from his autobiography (1834) (caps his) --------------End of forwarded message------------------------- -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding@manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 14-Feb-08 Time: 19:03:02 ------------------------------ XFMail ------------------------------
On Thu, Feb 14, 2008 at 7:03 PM, Ted Harding <Ted.Harding@manchester.ac.uk> wrote:
The following was just posted to the Seattle Linux List. I don't get it (either one). Can someone explain? Ted.
On Thu, Feb 14, 2008 at 10:31:29AM -0800, Xeno Campanoli wrote:
!rm
That will repeat your last rm command.
!rm:p
I don't know what the ":p" will do. Anyone else? Tim.
Tim Green wrote:
!rm:p
I don't know what the ":p" will do. Anyone else?
See "man bash", HISTORY, Modifiers: After the optional word designator, there may appear a sequence of one or more of the following modifiers, each preceded by a ‘:’. ... p Print the new command but do not execute it. Personally I use Control-R for history searching, that's automatically more visual, you can hit it repeatedly to find older matches, and when you find the command you want to re-execute you can just hit return. -- Martijn
participants (3)
-
Martijn Koster -
Ted.Harding@manchester.ac.uk -
Tim Green