AAB serves to provide you with a collection of useful reminders.
Shebang line
#!/usr/bin/env bash
Conditional test
[[ 1 -eq 1 ]] && echo "1 equals 1"
[[ 1 -eq 2 ]] || echo "1 does not equal 2"
Tables
$ echo -e "Name Age\nNick 28\nRobert 36\nAnne 42" | column -t
Name Age
Nick 28
Robert 36
Anne 42
Sorting
$ cat unsorted.txt
punchiest
restlessness
hummingbirds
Manitoba
equalising
$ cat unsorted.txt | sort
equalising
Manitoba
hummingbirds
restlessness
punchiest
n-th Field
$ cat fields.txt
first second third fourth
$ cat fields.txt | awk '{print $2}'
second
Filter for a string
$ cat filter.txt
this is
a text file
$ cat filter.txt | grep text
a text file
Filter for a string between two strings
$ cat filter.txt
this is a text file
$ cat filter.txt | grep -oP '().*?()'
a text file