Bash

Bash is a command-line interpreter and also a scripting language.

Scripts
ScriptSstore

Basics
Every program you is created as child proces from some process. Process is created as described on this scheme:

/bin/bash -> fork -> execve

now we have two processes in the memory (bash and our process). When child process is running, parent sleeps.

Conditionals
if expression ; then something; fi

Loops
for each in *; do echo "This file is named " $each; done

Pipes
Every program has 3 opened files:
 * 0 - stdin
 * 1 - stdout
 * 2 - stderr

You can pipe stdout to the file using > symbol. Error stream using 2>. When do you want both of them you can use &>. If you want read stderr using program like less, you have to redirect stderr to the stdout like this "ls notexists 2>&1 | less".