| Command line syntax |
sort -f -r -o neat messy verymessy
sort is the command name.
-f -r -o neat are the options.
-o neat is an option whose argument is
neat.
messy verymessy are
the command operands or arguments.
messy
and verymessy and then sort this data. The result
is to be written in output file neat because we used the output
option -o.
Because -f was given, sort folds upper
and lower case letters, that is, it ignores case;
the -r indicates the output is to be in reverse order.
| Syntax (from System V interface definition, 1985) |
-.
ar,
tar are nonconforming.
-fr is fine.
-rf -o neat or
-o neat -r -f or
-o neat -fr are fine.
-o, must given as:
-o arg1,arg2,...,argn
where the only space is just after -o
-o 'arg1 arg2 ... argn'
with spaces only where indicated
and the arguments are never optional. Tab may replace space.
lp -dBIGPRINTER works.
-- indicates the end of options
(to allow use of - in command operands).
- means stdin.
-- when followed by something other than a blank introduces
a multicharacter option and does not mean end of options.
This is a GNU extension which allows for a wider variety of options
and more meaningful names. For example, --help.
+ is like
- but inverts the
meaning of the option (turn off instead of on).
This is an extension which only some programs follow.
| Other notes |
[ ] means optional,
| means or,
... means repeat,
{ } means grouping (consider as a unit).
On many Unix systems, see also the start of intro(1):
man -s 1 intro
Last update: 2001 January 1