//View Tip #6
Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
Use || to run a second command if and only if a first command fails:
cd /tmp/a/b || mkdir -p /tmp/a/b


mkdir -p /tmp/a/b && cd /tmp/a/b