Skip to content

Commit ac86ae0

Browse files
committed
Create printargs script
1 parent ccfe3a2 commit ac86ae0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

terminal/printargs.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
# A script to print the given arguments, to help me debug things.
3+
4+
set -euo pipefail
5+
6+
echo -e "${0} was called with the following arguments:\n"
7+
8+
i=1
9+
for arg in "${@:i}"; do
10+
echo "\${${i}} was:" ">${arg}<"
11+
i=$((i+1))
12+
done

0 commit comments

Comments
 (0)