#!/bin/bash echo "There are $# arguments" echo $@ echo The program name is: $0 if [[ $# -gt 0 ]]; then echo "The first arguement is $1" fi echo for arg in "$@"; do echo -e "\t ${arg}" done echo echo " A second way " echo i=1 while [ $# -gt 0 ] do echo $i, $1, $# shift 1 i=$((i + 1)) done