From 7ceaf1d975a17d07f1704d8edf4476218148cfba Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Fri, 20 Feb 2015 08:10:51 +0100 Subject: tee: treat '-' operand as file name as mandated by POSIX Since v5.2.1-1247-g8dafbe5, tee(1) treated '-' as stdout while POSIX explicitly requires to treat this as a file name. Revert this change, as the interleaved output - due to sending another copy of input to stdout - is not considered to be useful. Discussed in http://lists.gnu.org/archive/html/coreutils/2015-02/msg00085.html * src/tee.c (tee_files): Remove the special handling for "-" operands. (usage): Remove the corresponding sentence. * doc/coreutils.texi (common options): Remove the "tee -" example. (tee invocation): Document that tee(1) now treats "-" as a file name. * tests/misc/tee.sh: Add a test case for "tee -". While at it, re-indent the above multi-argument processing case and extend that to 13 operands, as POSIX mandates that, too. * tests/misc/tee-dash.sh: Remove now-obsolete test. * tests/local.mk (all_tests): Remove the above test. * NEWS (Changes in behavior): Mention the change. --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index b6795aacf..859735743 100644 --- a/NEWS +++ b/NEWS @@ -73,6 +73,10 @@ GNU coreutils NEWS -*- outline -*- tee will exit early if there are no more writable outputs. + tee does not treat the file operand '-' as meaning standard output any longer, + for better conformance to POSIX. This feature was added in coreutils-5.3.0. + + ** Improvements cp,install,mv will convert smaller runs of NULs in the input to holes, -- cgit v1.2.3-70-g09d2