aboutsummaryrefslogtreecommitdiffstats
path: root/tools/words
diff options
context:
space:
mode:
Diffstat (limited to 'tools/words')
-rwxr-xr-xtools/words13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/words b/tools/words
new file mode 100755
index 0000000..ac76d0d
--- /dev/null
+++ b/tools/words
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ "$#" -ne 0 ]; then
+ echo "Usage: $0"
+ echo ""
+ echo "Echo each whitespace-separated word in stdin on a new line."
+ exit 1
+fi
+
+i=0
+for word in $(cat); do
+ echo "$word"
+done