In computer
command line interfaces, a command line argument is an
argument sent to a program being called. In general, a program can take any number of command line arguments, which may be necessary for the program to run, or may even be ignored, depending on the function of that program.For example, in the popular
Unix environment, an example of a command-line argument is:rm file.s "file.s" is a command line argument which tells the program rm to remove the file "file.s".Programming languages such as
C,
C++ and
Java allow a program to interpret the command line arguments by handling them as string parameters in the
main function.
See more at Wikipedia.org...
<
software> (Or "option", "flag", "switch", "option switch") An argument to a command that modifies its function rather than providing data. Options generally start with "-" in
Unix or "/" in
MS-DOS. This is usually followed by a single letter or occasionally a digit.
Some commands require each option to be a separate argument, introduced by a new "-" or "/", others allow multiple option letters to be concatenated into a single argument with a single "-" or "/", e.g. "ls -al". A few Unix commands (e.g.
ar,
tar) allow the "-" to be omitted. Some options may or must be followed by a value, e.g. "cc prog.c -o prog", sometimes with and sometimes without an intervening space.
getopt and
getopts are commands for parsing command line options. There is also a
C library routine called getopt for the same purpose.
(1996-12-11)