take (499B)
1 #!/bin/bash 2 3 [ -z $1 ] && echo "usage: take arms 4 take to the artillery 5 take a long walk off a short pier" && exit 1 6 7 args="$@" 8 9 check(){ 10 echo "$args" | grep "$1" >/dev/null 11 } 12 13 [ ! -f /tmp/sudo ] && echo "take: operation not permitted" && exit 14 15 check "arms" && cat data/ascii/take-arms && exit 16 17 check "to the artillery" && cat data/ascii/take-to-the-artillery && exit 18 19 check "a long walk off a short pier" && cat data/ascii/take-a-long-walk-off-a-short-pier && exit 20 21 echo "Unrecognized command: $@"