#! /bin/sh script=$1 shift cat > $script <<EOF #! /bin/sh # compile must fail with a normal error $@ if test \$? != 1; then exit 1 fi exit 0 EOF chmod +x $script