Email List: Xaustin-group-lX
[All Lists]

Options vs operands

To: yyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Options vs operands
From: Ben Harris <yyyyy@xxxxxxxxxx>
Date: Tue, 24 Jun 2003 22:51:46 +0100 (BST)
Quick question:  Does "-" as an argument to a utility count as an option
or an operand (assuming its position makes it clear)?  To give a more
concrete example, I'd like to know what (if anything) the standard says
"split - -b" should do.  I feel that it should split stdin into files
called "-baa", "-bab", etc, but I can't find anything in the Utility
Syntax Guidelines which states this unambiguously.  Indeed, I'm not sure I
can find anything which defines how implementations are to find the end of
the options in the absence of "--" at all.

The definition of getopt() seems to agree with my feeling, but it's meant
to follow the Guidelines, not define them.

-- 
Ben Harris                                                   <yyyyy@xxxxxxxxxx>
Portmaster, NetBSD/acorn26           <URL:http://www.netbsd.org/Ports/acorn26/>

<Prev in Thread] Current Thread [Next in Thread>