Bash tricks & tips
The following examples are not difficult coding examples, but just quick reminders to make working with bash easier and quicker.
# Use last argument of previous command
touch somefile
vim !$
# Monitor code execution
/bin/bash -x command
# or declare it at the top of the script
#!/bin/bash -x
# Repeat previous command changing a world with an other
for i in $(seq 0 10); do mv somefile.somext somefile.newext; done;
^ somext ^ somotherext^
# Rename a file to file.bak
mv file{,.bak}
# Create a directory and all the needed path if not exists yet
mkdir -p /non-existing/path/to/dir
# Lists all backgrounded processes in this shell
jobs