Skip to content

Instantly share code, notes, and snippets.

@G3NSVRV
Created January 21, 2019 18:21
Show Gist options
  • Save G3NSVRV/946399b3f4d5c69a2acdded6ab380fc3 to your computer and use it in GitHub Desktop.
Save G3NSVRV/946399b3f4d5c69a2acdded6ab380fc3 to your computer and use it in GitHub Desktop.
bash Input var script that test how many arguments were typed and print them on screen
#!/bin/bash
echo "Total number of arguments: $#"
value=$#
for (( c=1; c<=$value; c++ ))
do
echo "Argument: $1"
shift
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment