[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch to shellutils / tee.c
From: |
Martin Blais |
Subject: |
patch to shellutils / tee.c |
Date: |
Fri, 7 Jun 2002 16:44:37 +1000 |
> How to Help
> To contact the maintainers, either to report a bug or to contribute fixes
or improvements, send mail to address@hidden
hi
i've been craving for an option to tee to be able to output to stderr. i'd
been using the following shell function for a while:
function teeerr () {
# print stdin to both stdout and stderr
while read i ; do
echo "$i"
echo "$i" 1>&2
done
}
but i just had a look at the source code and adding the capability to tee was
dead easy, so i just did it myself. the patch is attached, as well as what i
propose should be the new tee.c (the patched file). if you're going to
consider it, please review the changes, it should be very simple. i branched
off of 2.0.12 from alpha.gnu.org.
this feature is convenient to monitor something in the middle of a pipe which
doesn't otherwise output error nor output. another possibility was to tee to
a fifo, and tail off the fifo, but that requires creating and destroying the
fifo.
please let me know if you decide to include the patch.
thank you,
tee-patch
Description: Text Data
tee.c
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- patch to shellutils / tee.c,
Martin Blais <=