Confusion about changing meaning of arguments and options, is there an official standard definition?
11
votes
1
answer
962
views
I came across a confusing variation in the understanding what options and arguments are with regard to the syntax of commands.
For instance, I encountered definitions like:
-
command -a -b -c d e f
some differ between -a -b -c
, call them options or switches and d e f
by calling them arguments.
- command -a -b -c d e f
some, for instance a bash
manual, call all -a -b -c d e f
arguments and explains, that all of them are accessible from a script by $1 $2 $3 $4 $5 $6
respectively.
- command -a b=c
some call -a
an option, b
an argument and c
the value, but others mix them like in the first two points, in one variety calling all -a b c
arguments.
Those three versions are only examples for a plethora of different calling varieties, I do not even know how to list them all, but I noticed that for sure there is no fixed naming convention.
Or at least, there is no standardised naming convention I know about, because I came across different random sources, but even among official Linux and GNU affiliated sites or manuals I could met this inconsistency.
Is there a unquestionable official naming scheme I can refer to?
Asked by sharkant
(3810 rep)
May 11, 2017, 10:30 AM
Last activity: Aug 20, 2024, 06:00 AM
Last activity: Aug 20, 2024, 06:00 AM