Shell Script Program Using Command Line Arguement


echo "The name of the script file is $0"


echo "Total number of arguments passed to the script = $#"


if [ $# -gt 0 ]
then

  echo "List of arguments:"
  for arg in $@
  do
    echo "$arg"
  done

else

  echo "No argument provided to the script."

fi

Leave a comment