Bug 117733 - [patch] [request] allow to tee(1) to sockets, descriptors
Summary: [patch] [request] allow to tee(1) to sockets, descriptors
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 6.2-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2007-11-01 03:50 UTC by Mikhail T.
Modified: 2022-10-17 12:40 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail T. 2007-11-01 03:50:01 UTC
	The proposed patch would allow tee to be used to send data
	to TCP or UDP sockets, as well as to the already opened
	file-descriptors (such as 2) without resorting to hacks
	like /dev/stderr.

	There can be any number of these "files" specified, as long
	as they preceed the regular files on the command line.

	For example:

	tee -d 2 -t www.example.com 80 -u localhost 1081 log1.txt log2.txt

	The patch also modifies the usage() handling to exit with 0,
	when help was requested (-h), and with EX_USAGE otherwise.

Fix: 

See

		http://aldan.algebra.com/~mi/ntee.diff.html

	for readable and

		http://aldan.algebra.com/~mi/ntee.diff

	for applicable patch.
Comment 1 Hiren Panchasara freebsd_committer freebsd_triage 2017-01-06 01:04:03 UTC
Links here are still valid for the patch. :-)
I am not sure if this is still worth pursuing but assigning to -net for now.
Comment 2 Julian Elischer freebsd_committer freebsd_triage 2017-01-14 16:44:11 UTC
I personally like this..  we should do it.
Comment 3 Julian Elischer freebsd_committer freebsd_triage 2017-01-14 16:46:18 UTC
(In reply to Julian Elischer from comment #2)
adding that in this world more and more cross-machine work is encountered.
This would work well with netcat.
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:40:40 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Comment 5 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:40:59 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>