#!/bin/bash exit_code="$1" for i in $(seq 50) do echo "$i" sleep 0.1 done exit "$exit_code"