Source: https://theswissbay.ch/pdf/Gentoomen Library/Programming/Bash/O'Reilly bash CookBook.pdf