Re: bash: any way to reuse the last output?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 23, 2004 at 03:20:17AM -0200, Herculano de Lima Einloft Neto wrote:

>    This happens all the time: after an intricate find, I decide
> to grep something out of that very same find, for instance. It
> would be nice to have some tweak to reuse the last output without
> having to run the command again. Anyone?

If you're only dealing with a partial screenful of data, you could cut
and paste it into a "here" document:

    $ grep foo <<EOF
    > { paste stuff to be grepped here }
    > EOF

If you have too much data to paste into a here document, I'm afraid
that you're out of luck.  I doubt that bash saves the output anywhere
due to the performance hit and the need to deal with both stdout and
stderr seperately.  It sure would be a handy thing to have on the few
occasions when you need it though.

-- 
John Kodis                                    Goddard Space Flight Center
kodis@xxxxxxxxxxxxxxxxxxxxx                      Greenbelt, Maryland, USA
Phone: 301-286-7376                                     Fax: 301-286-1771




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux