In terminal, I can search to end of log faster than the data gets there
2
votes
1
answer
181
views
[The Question]
*Is there some way to have the pipe/tee/write combo write lines immediately? ... if it can be done, what is the trade-off?*
[The Backdrop]
My script sends a keypress to the terminal, which is running
app
.
That keypress causes app
to write a *marker* to its log.
The log is the *app's* normal screen output (timestamped lines).
The log is being written via | tee -a log
The marker *marks* the line I want; ie. the timestamped line *before* the marker.
The problem is that when I then *immediately* search the log (using sed
from the same script), it sometimes returns a previous marker, ie. the most recent marker has not been written to the log yet.
I assume this is a buffering issue, but I'm in unknown territory with that.
Not sure if it matters: The script is elisp
. The terminal is emacs terminal emulator
with a bash
shell.
Asked by Peter.O
(33644 rep)
Dec 10, 2011, 03:41 PM
Last activity: Dec 10, 2011, 04:04 PM
Last activity: Dec 10, 2011, 04:04 PM