Next: Standard input,output,error Up: The shell Previous: The shell

Command line

The line that contains the command, options and arguments, is called the command line

A typical command line should be like :

command [opt1] [opt2] ... [optM] [arg1] [arg2] ... [argN] <return>

As you can see, there should be at least one space between command, each option and each argument. When you forget the space, shell tries to interpret the whole word as a single command or a single argument.

Each command has a command name. There has to be at least one command name in a command line. In the example below, command name is ls

An option is an argument that modifies the effect of a command. Options are specific to the command, and usually written with a '-' (minus) character in front of them. This minus character is used by the command to distinguish the options from arguments. Each command has its own options. In the example below, -lF is two options written together. They could have been written as -l -F too.

An argument is a filename, string of text, number or some other object that a command acts on. In our example /usr/local/bin and /tmp are arguments of the command.

   <mendelson:~> ls -lF /usr/local/bin /tmp