[ -e README ] && cat README
[ -e README ] || echo "You should write a README!"
What's more pernicious is that pipelines don't cause the shell to exit (assuming set -e) unless the last command fails:
grep foo README | sort
What's more pernicious is that pipelines don't cause the shell to exit (assuming set -e) unless the last command fails:
does not fail if README doesn't exist, unless you've also used `set -o pipefail`.