bash: any way to reuse the last output?

Herculano de Lima Einloft Neto hlen at ig.com.br
Fri Jan 23 05:45:24 UTC 2004


Ben Stringer wrote:
> You could use the "script" command to save all shell session output to a
> file, in case it is needed.

That would probably be worse.. :)

> Or you could get into the habit of appending "| tee /tmp/<uniquename>"
> each time you run a command you are likely to want to reuse output from.

What's the way to append that tee without having to type it every time? 
Something like PROMPT_COMMAND, I don't know, and then, making up an 
environment variable pointing to /tmp/<uniquename> would do the trick, 
right.. but how can I append the tee?

Thanks,
--
Herculano de Lima Einloft Neto





More information about the fedora-list mailing list