if [ ! -z "$(which puppet)" ]; then foo ; else bar; fi