Browse files

argv turns arguments into lines (useful for testing shell quotes)

  • Loading branch information...
1 parent c304d2b commit 416365b9654c9f66e9a4adaa6ffd5cec3f454ad9 @rtomayko committed Apr 28, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 bin/argv
View
10 bin/argv
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Usage: argv <args>
+# Dump arguments
+set -e
+count=0
+for a in "$@"
+do
+ count=$(( count + 1 ))
+ echo "$count: $a"
+done

0 comments on commit 416365b

Please sign in to comment.