coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "tee -" treating "-" as stdout violating POSIX?


From: Eric Blake
Subject: Re: "tee -" treating "-" as stdout violating POSIX?
Date: Wed, 18 Feb 2015 17:34:17 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 02/18/2015 04:50 PM, Pádraig Brady wrote:

>>> I assume it's too late to revert the behavior to adhere to POSIX
>>> rules as it may break existing use cases.

>>
>> I don't think the "-" behavior is useful in this case.
>>
>> I vote for fixing it as a bug fix.
> 
> It's one of those borderline ones.
> Given no-one has complained, I think there is a
> greater chance that someone is relying on the current behavior.

But their reliance on the behavior is non-portable if they switch to a
POSIX machine.

> There are already lots of gotchas with a file named '-',
> so I wouldn't be on for change to support that.

Anyone using './-' as the file name avoids the ambiguity without regard
to whether '-' is special.  But I'm still 60:40 in favor of fixing it as
a bug fix, for consistency with other POSIX implementations.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]