bug-gnu-utils
[Top][All Lists]
Advanced

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

Suggested additional option for "sed"


From: Van Snyder
Subject: Suggested additional option for "sed"
Date: Fri, 02 Mar 2001 17:16:15 -0800

I tried to highlight the output from a program by putting color-xterm
escape sequences around interesting stuff, by piping the output through
"sed".

The highlighting worked fine, but, being in a pipe, sed ran buffered, so
as the program was running the xterm just sat there, then BLAST, all of
the output scrolled off of the top of the screen.

It would be useful if "sed" had an option, say "-u", to run unbuffered,
i.e. if "-u" is set, do this first:

  setvbuf ( stdout, (char*)NULL, _IONBF, 1 ); /* unbuffer the output */

-- 
What fraction of Americans believe   |  Van Snyder
Wrestling is real and NASA is fake?  |  address@hidden
Any alleged opinions are my own and have not been approved or disapproved
by JPL, CalTech, NASA, Dan Goldin, George Bush, the Pope, or anybody else.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]