Jason,
Sun's Solaris' tee utility also produces a file named - in
this case. However, it isn't clear to me that this is non-conforming
behavior. The rationale describing Guideline 13 on XRAT (2004 edition)
P75-76, L3070-3075 clearly states that it does not mean that all standard
utilities accept the operand '-' to mean stdin or stdout.
Furthermore, I believe that all cases where the standard intended
for a a file operand with value '-' to be treated as stdin or stdout
explicitly stated that fact in the description of the operand. The
description of the file operand for the tee utility does not specify
any special treatment for a file operand with the value '-'. (One thing
not mentioned in the rationale is that at the time the original SVID was
being written {including the System V Command Syntax Standard rules that
were used as the basis for the POSIX Utility Syntax Guidelines} there
were a few utilities being developed that treated '-' as an operand to
mean "the default" rather than "standard input" or a file named '-'.
The SVID writers wanted to discourage this practice. Using '-' to mean
"standard output" came from BSD and was included in POSIX.2's Guideline
13, but was not mentioned in SVID, SVID2, nor SVID3.)
Cheers,
Don
>Date: Tue, 10 Aug 2004 12:50:49 -0700
>From: "Jason Zions" <yyyyyyyy@xxxxxxxxxxxxxxxxxxx>
>X-Mailing-List: austin-group-l:archive/latest/7088
>
>Now that's an interesting example.
>
>cat foo | tee -
>
>Do you see two copies of foo in sequence on stdout, or do you see it
>interleaved line by line? Or read-block by read-block? Since tee doesn't
>buffer its output, I'd expect either of the last two possibilities.
>
>(My implementation in SFU 3.5 creates a file called "-". Pretty clearly
>non-conforming as the standard is currently written.)
|