...
history : lists the most recent commands
Exit/Close a terminal or
...
process (script, command)
The easiest way to exit a script/process is by pressing the keys Ctrl-c.
The easiest way to close a terminal is by pressing the keys Ctrl-d.
...
'\' prevents the following character from being "interpreted". There are several "special characters" (see above) in shell which have a certain "meaning" and functions function as little "commands".
Unfortunately '\' has different meanings depending on where/how it gets used.
Examples:
$ person=Alex
$ echo $person
Alex
$ Alex => Evaluation done !!!
echo \$person
$person => No evaluation done !!!
$ - Because of the back slash
echo "\$person"
$person => No evaluation done !!!
$ - Because of the back slash
echo '\$person'
Alex $person => Evaluation No evaluation done !!! - Because of the single quots
When used as the very last character in a line it will surpress suppresses the "new line".
$ cat > text_file << EOF
> Hello
> How are you?
> EOF
$ cat text_file
Hello
How are you? $ cat > text_file << EOF
> Hello, \
> how are you?
> EOF
$ cat text_file
Hello, how are you?
Command I/O
> :command output redirection (create new)
>> : command output redirection(append)
< :command input redirection (from file)
<< : command input (from script or standard input)
Example:
Volet |
---|
...
cat > text_file << EOF |
...
Hello, \ |
...
how are you? |
...
EOF |
...
cat text_file |
...
Hello, how are you? |
null device
/dev/null or the null device is a special file that discards all data written to it but reports that the write operation succeeded.
...