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

11 lines
213 B
Bash
Raw Permalink Normal View History

#!/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