I was looking for a way to check if a program is installed using Shell Script when I came across this answer which contained this code:
hash foo 2>&- || { echo >&2 "I require foo but it's not installed. Aborting."; exit 1; }
But that code isn't very (human) readable, what is the alternative for that syntax?