[ale] tcsh history command question

Chris Ricker kaboom at gatech.edu
Mon Aug 25 10:56:15 EDT 2003


On Mon, 25 Aug 2003, Dow Hurst wrote:

> I've seen Bob Toxen do this but can't remember the syntax.
> 
> Let's say you have a previous command you want to access and edit in a 
> simple way.  How could I easily incorporate a sed s/X/Y/g type syntax 
> into a history retrieval command?  Here is my example of what I'd like 
> to do:
> 
> Previous command:
> 
> Aslan 58% cp /etc/stdcshrc ./nmarshal/.cshrc
> ..
> Aslan 73% !58 s/cshrc/profile/g
> 
> will that do what I want or will that not?  What is the right way to do 
> this?  I'll take bash oriented explanations instead of tcsh since that 
> is the default under Linux.  Anyone have good examples of how to harness 
> the power of this type syntax?  Thanks a bunch,
> Dow

[cricker at mooru cricker]$ cp /etc/bashrc /tmp/foo
[cricker at mooru cricker]$ ^foo^bar
cp /etc/bashrc /tmp/bar
[cricker at mooru cricker]$ 

later,
chris
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list