aboutsummaryrefslogtreecommitdiffstats
path: root/tools/words
diff options
context:
space:
mode:
authorJan T <jan@jantuomi.fi>2025-11-13 11:31:30 +0000
committerJan Tuomi <jan@jantuomi.fi>2025-11-13 13:34:38 +0200
commit3df80b5afbebbf3af63b49fe98a3faecd2b68439 (patch)
tree3db37a25de23b7a6b21b3df261b84dc1359c1555 /tools/words
Initial commit
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