[ale] tcsh history command question

Fletch fletch at phydeaux.org
Mon Aug 25 11:19:54 EDT 2003


>>>>> "Dow" == Dow Hurst <dhurst at kennesaw.edu> writes:

    Dow> I've seen Bob Toxen do this but can't remember the syntax.
    Dow> Let's say you have a previous command you want to access and
    Dow> edit in a simple way.  How could I easily incorporate a sed
    Dow> s/X/Y/g type syntax into a history retrieval command?  Here
    Dow> is my example of what I'd like to do:


> Aslan 58% cp /etc/stdcshrc ./nmarshal/.cshrc
> ...
> Aslan 73% !58 s/cshrc/profile/g


You probably want:


!58:gs,cshrc,profile,


That should work in most anything with a csh-y history mechanism
(i.e. (t?c|ba|z)sh; although why anyone would be using anything but
the last . . . :).  As an aside / would work, I just tend to use , as
a seperator out of habit as it avoids clashes with any /'s in paths.

-- 

Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
770 294-0820 (m)      |  scary questions." -- Jules                =(___)=
                      |                                               U
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list