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

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

 



Bill Rugolsky Jr. wrote:
Piping the output to another process causes stdio buffering
which is not what you want.  You need pty terminal handling.

Could you tell me why is that?

One could use expect's "interact" command to save the output of each
command in a ring of files (say 0-9) in a spool directory.

I've been going over expect(1), but am stuck. Would you give me some pointers on how I could save all the output between two expect positives to a file?

#!/usr/local/bin/expect -f

spawn $env(SHELL)
interact
expect "*\]\$ " #will do for now

#something here..?

Thanks a lot, interesting stuff
Special thanks also to Mike Klinke and Ben Stringer
--
Herculano de Lima Einloft Neto




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

  Powered by Linux