1
0
Fork 0
toolkit/packages/exec/__tests__/scripts/print-args-sh.sh

11 lines
213 B
Bash
Executable File

#!/usr/bin/env bash
# store arguments in a special array
args=("$@")
# get number of elements
ELEMENTS=${#args[@]}
# echo each element
for (( i=0;i<$ELEMENTS;i++)); do
echo "args[$i]: \"${args[${i}]}\""
done