summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-01-10 10:42:22 +0100
committerErich Eckner <git@eckner.net>2019-01-10 10:42:22 +0100
commit4fbf7d38ce729c46dbd37e3f6bfb286fc9a6bfdb (patch)
tree7f2c5d1cb30b5c6b70a6c41bf1b82d86bc14faf3
parent01dc6496d063a8f04f5716cd30098db4d0619481 (diff)
downloadmarkov-4fbf7d38ce729c46dbd37e3f6bfb286fc9a6bfdb.tar.xz
generate-random-word-from-wikipedia.sh: add help text
-rwxr-xr-xgenerate-random-word-from-wikipedia.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/generate-random-word-from-wikipedia.sh b/generate-random-word-from-wikipedia.sh
index fbc720f..447cc81 100755
--- a/generate-random-word-from-wikipedia.sh
+++ b/generate-random-word-from-wikipedia.sh
@@ -2,6 +2,11 @@
base_dir=$(readlink -f "$(dirname "$0")")
+if [ $# -ne 3 ]; then
+ >&2 printf 'usage: %s wiki-depth markov-depth word-count\n' "${0##*/}"
+ exit 1
+fi
+
depth=$1
shift