set -o errexit
print_error() {
  echo "Error occurred:"
  awk 'NR>L-4 && NR<L+4 { printf "%-5d%3s%s\n",NR,(NR==L?">>>":""),$0 }' L="$1" "$0"
}
trap 'print_error "$LINENO"' INT

echo one
echo two
echo three
echo four
false
echo five
echo six
echo seven
echo eight
