From e3f67d934025ba0c6853e8b8cdaddb97dbac1283 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 25 Dec 2011 17:19:45 -0500 Subject: rename `hangman' to `hangman-helper' to avoid conflict with bsd-games --- .gitignore | 2 +- Makefile | 2 +- hangman-helper.sh | 15 +++++++++++++++ hangman.sh | 15 --------------- 4 files changed, 17 insertions(+), 17 deletions(-) create mode 100644 hangman-helper.sh delete mode 100644 hangman.sh diff --git a/.gitignore b/.gitignore index cd6b837..2962396 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ daemon e emacsmail emacsterm -hangman +hangman-helper maildups newegg offlineimap-runner diff --git a/Makefile b/Makefile index d063078..5a82eec 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ BINFILES = \ e \ emacsmail \ emacsterm \ - hangman \ + hangman-helper \ maildups \ newegg \ offlineimap-runner \ diff --git a/hangman-helper.sh b/hangman-helper.sh new file mode 100644 index 0000000..5e0e138 --- /dev/null +++ b/hangman-helper.sh @@ -0,0 +1,15 @@ +#!/bin/sh +word=$1 +not=$2 +flag=$3 + +temp=`mktemp` + +grep -i '^'"$word"'$' /usr/share/dict/words | grep -iv "['$not]" > "$temp" + +if [ "$flag" = '-l' ]; then + cat "$temp" | tr 'A-Z' 'a-z' | sed 's/\(.\)/\1\n/'g | sort | uniq -c | sort -n +else + cat "$temp" +fi +rm "$temp" diff --git a/hangman.sh b/hangman.sh deleted file mode 100644 index 5e0e138..0000000 --- a/hangman.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -word=$1 -not=$2 -flag=$3 - -temp=`mktemp` - -grep -i '^'"$word"'$' /usr/share/dict/words | grep -iv "['$not]" > "$temp" - -if [ "$flag" = '-l' ]; then - cat "$temp" | tr 'A-Z' 'a-z' | sed 's/\(.\)/\1\n/'g | sort | uniq -c | sort -n -else - cat "$temp" -fi -rm "$temp" -- cgit v1.2.3-2-g168b