Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Manual Synopsis Syntax for Alternative Groups of Arguments

1 view
Skip to first unread message

MajorS...@excite.com

unread,
Apr 28, 2006, 11:39:53 AM4/28/06
to
If I have a shell level program, prog, that may have arguments
prog -a b -c d
or alternatively
prog -e f -g h
how would I write that in the manual synopsis?
Would it be
prog (-a b -c d) | (-e f -g h)
?

Thanks,
Peter.

Stephane Chazelas

unread,
Apr 28, 2006, 12:28:51 PM4/28/06
to

--
Stephane

Bill Marcum

unread,
Apr 28, 2006, 12:37:27 PM4/28/06
to
["Followup-To:" header set to comp.unix.shell.]

On 28 Apr 2006 08:39:53 -0700, MajorS...@excite.com
You could simply use two lines:

prog -a b -c d
prog -e f -g h


--
If opportunity came disguised as temptation, one knock would be enough.

MajorS...@excite.com

unread,
Apr 28, 2006, 1:21:33 PM4/28/06
to

Thanks but what if you have a bunch of options as well like
prog -a b -c d [-w x -y z -q r -s t]
prog -e f -g h [-w x -y z -q r -s t]
Is there no way of compacting this synopsis?

Thanks,
Peter.

jiin

unread,
Apr 28, 2006, 2:50:32 PM4/28/06
to
On 28 Apr 2006 16:28:51 GMT, Stephane Chazelas
<stephane...@yahoo.fr> wrote:


The normal way to express this in either the manual entry or the usage
statement would be something like this:

prog [-options] <argument>
-a all
-b baker
-r recursive
-z encrypt


Roadhard

M. Åhman

unread,
Apr 28, 2006, 2:30:08 PM4/28/06
to
On 28 Apr 2006 10:21:33 -0700
MajorS...@excite.com wrote:

One or none of alternatives: [ this | that | other ]
Exactly one of alternatives: { this | that | other }

--
Magnus

MajorS...@excite.com

unread,
Apr 28, 2006, 4:35:40 PM4/28/06
to
Ah, that's whay I was looking for.

Thanks,
Peter.

0 new messages