[sf-lug] My favorite simple little Linux tips

Michael Shiloh michaelshiloh1010 at gmail.com
Wed Aug 4 15:58:48 PDT 2010


Zing! A great one. Thanks Jesse. Right into my "important hints" file.

On 08/04/2010 03:54 PM, Jesse Zbikowski wrote:
> On Fri, Jul 30, 2010 at 9:05 PM, Akkana Peck<akkana at shallowsky.com>  wrote:
>> $ !-4:gs/foo/bar
>>
>> runs the fourth-to-last command, replacing every foo with bar
>> (gs means global substitute).
>
> That's pretty cool. I was afraid to use history expansion until I discovered
>
> $ shopt -s histverify
>
> (setopt histverify in Zsh). This lets you see and edit the expanded
> command before hitting enter; useful for when you accidentally type
>
> $ rm -rf junk
> $ !!:s/junk/*
>
> _______________________________________________
> sf-lug mailing list
> sf-lug at linuxmafia.com
> http://linuxmafia.com/mailman/listinfo/sf-lug
> Information about SF-LUG is at http://www.sf-lug.org/
>

-- 
Sent from my ASR-33




More information about the sf-lug mailing list