This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Adding support for `cat a.out | size -`
- From: Nick Clifton <nickc at redhat dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: Ahmad Fatoum <ahmad at a3f dot at>, binutils at sourceware dot org
- Date: Wed, 8 Nov 2017 10:15:30 +0000
- Subject: Re: Adding support for `cat a.out | size -`
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=nickc at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BDE3163E0B
- References: <DF9F6A9A-0380-44FC-B976-8E6681CD498C@a3f.at> <10aede1a-65e4-234a-e4d4-83e42de2937c@redhat.com> <mvmshdpqgv9.fsf@suse.de>
Hi Andreas,
>>> In any case, this would still be a breaking change, because size - reads a - file at the moment. Should I add a command line flag?
>>
>> Yes. Presumably "--" would be the appropriate flag.
>
> No, that would be wrong. '-' is not a option, so '--' does not suppress
> its meaning. Likewise, `cat -- -' always reads stdin, not the file
> `./-'.
I see what you mean. OK, how about a --file option whose argument is always interpreted
as a file name, even if it is "-" ?
Cheers
Nick