[comp.sources.d] v03i077: hold -- terminate a pipe with its input

dv@unicom.UUCP (Ivade Deviz @ Vern) (07/20/88)

In article <8807050034.AA23702@ccicpg>, bill@qst1.tcc.com (Bill Cox) writes:
> Here's an unpdated version of hold.c, that lets you terminate a pipe with its
> input file, effectively putting the output back into the input file, as in
> 	tail SYSLOG | hold SYSLOG

Just a quick comment (no flame, relax):  I believe that "sort" can do the
same thing, if you use the -m and -o options (-m to not sort, and -o for
output file).  With that, you could do:

tail SYSLOG | sort -m -o SYSLOG

However, sort -m won't hold a pipe, but rather will just flush through.
It's no different from "cat" except when given -o (this under 4.3 BSD,
btw, where "cat" is line buffered).
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       David W. Vezie, Systems Hacker  |        dv%unicom@pacbell.com
 "I support Star Wars (tm),            |            pacbell!unicom!dv
    it's SDI that I can't stand"  --Me | {sun,ucbvax}!pixar!unicom!dv