The command-line shell is a textual interface for interacting with the operating system.
We tell the operating system what to do by issuing it commands.
A command is simply a name of an application; when writing a command in the command-line shell, we are calling that program - we tell the operating system to run it.

For example - the command "echo" allows us, the users, to print text on the screen.
To tell it what to print, we need to pass the text to print as an input argument.
The text printed on the screen is the program's output.
If we want to print "Grateful Dead" on the screen, we would write the following command:

echo "Grateful Dead"
Like so:


In the above example:
1 is the command that we want to run. In this case it is "echo", a command that prints it's input on the screen.
2 is the command's input, which is simply the text to print on the screen.
3 is the command's output - the text that we wanted to print.

Another example is the "cat" command, which allows us to print a file's contents on the screen.
The command's input is the file's name, and it's output is the file's contents.
So, if I would like to print the content of a file called "SonicYouth", I would issue:

cat SonicYouth
Like so:


In the above example:
1 is the command. In this case it is "cat", a command that prints a file's contents on the screen.
2 is the command's input, which is the name of the file whose content we want to print on the screen.
3 is the command's output, the contents of the file that was given as an input for the command.

Some commands can accept flags, additional inputs that can modify the operation of the command.
For example, the command "cat" has a flag called "-n". When this flag is supplied, "cat" will number every line of it's output, like so:


In the above example 2 is the flag that we're supplying to the command.


Some commands can accept multiple flags and input arguments.

For example, the command "cat" can print multiple files one after the other. To do so, one needs to supply the names of the files one after the other, as input arguments. In addition, "cat" has many flags. Besides the "-n" flag, there is also the "-E" flag, which modifies the command's behavior to print a "$" after each output line. One can call "cat" and give it multiple flags and arguments, like so:


In the above example:
2 and 3 are the flags that we're supplying to the command.
4 and 5 are the command's inputs.
6 and 7 are the command's outputs.

There are many command-line shells - here at the Hebrew University we use a command-line shell called zsh.
You're invited to read more about it by using the command:

man zsh