Skip to content

Commit e9e61e5

Browse files
committed
Convert filterArgs.sh to POSIX shell
requested by qlal1 in the #!/bin/mksh channel on Freenode IRC
1 parent 3b3d4d8 commit e9e61e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contrib/filterArgs.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Loop over all command line arguments
55
for i in "$@"; do
66
# If an argument starts with -L, echo it out sans -L!
7-
if [[ $i == -L* ]]; then
8-
echo "\"${i:2:${#i}}\""
9-
fi
7+
case $i in
8+
-L*) printf '"%s"\n' "${i#-L}" ;;
9+
esac
1010
done

0 commit comments

Comments
 (0)