Prefer executing command line commands via script and not the command line. Benefits:

Bash

Bash is the Bourne Again Shell.

Written for the GNU Project to replace the Bourne Shell (sh).

Default shell of most Linux distrobutions.

Check return code:

echo $?

Looping

for VARIABLE in 1 2 3
do
    echo $VARIABLE
done

Editing Files

echo “replacement” > file

echo “append” >> file

Scripting

#!/bin/bash
# uses bash as opposed to the user's shell.

set -e # makes the script end on error

Keys Shortcuts