bash: any way to reuse the last output?

c q rsnic at hotmail.com
Fri Jan 23 10:02:33 UTC 2004


On Thu, 22 Jan 2004 22:32:12 -0800, Prasanth Kumar wrote:

> On Thu, 2004-01-22 at 22:10, Herculano de Lima Einloft Neto wrote:
>> Mike Klinke wrote:
>> > Perhaps you could create a perl, tcl, or bash script as a front end 
>> > which you can "alias" to find which will store the stdout in a file 
>> > for you.
>> 
>> No go.. that would only work for find, and not the hundreds of
>> other commands..
>> 
>> c q wrote:
>> > You could always save the output to a file and then use cat
>> > e.g. locate so > t.txt
>> > cat t.txt | grep whatever
>> 
>> That doesn't do me much good, since the tee would be much better.. but
>> the main question now is: how to append it without having to type it
>> every time? It's supposed to be for every command executed, since the
>> will to manipulate only sparks afterwards.
>> 
>> Thanks all,
>> --
>> Herculano de Lima Einloft Neto
>> 
> 
> This will not answer your question as you still need to rerun the
> commands but the typing is pretty short:
> 
> locate so
> !! | grep whatever
> 
> -- 
> Regards,
> Prasanth

locate file > t.txt  //creates a new file or overwrites file with new data
locate file >> t.txt //appends more data to the end of t.txt





More information about the fedora-list mailing list