#!/bin/bash echo "This script (${0}) was called with ${#} arguments." echo "They are: ${*}" echo "Broken apart they are:" echo " \$0: ${0}" count=1 while [ ! -z "${1}" ]; do echo " \$${count}: ${1}" shift let count=${count}+1 done exit 0