#!/bin/bash ls echo "after ls command, \$? is: $?" cp moo oink echo "after bad cp command, \$? is: $?"