Source: https://www.cv.nrao.edu/~jmalone/talks/bash.pdf