diff options
author | Nathan Lasseter <Nathan Lasseter nathan@bytemark.co.uk> | 2015-09-18 11:51:28 +0100 |
---|---|---|
committer | Nathan Lasseter <Nathan Lasseter nathan@bytemark.co.uk> | 2015-09-18 11:51:28 +0100 |
commit | b0a14e013b318fa87714414b8ece95780527bddf (patch) | |
tree | a9427383ab6e38a4421c9c4313043f6dfcb8e90e /botchcli |
Initial commit
Diffstat (limited to 'botchcli')
-rwxr-xr-x | botchcli | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/botchcli b/botchcli new file mode 100755 index 0000000..5dfa0f7 --- /dev/null +++ b/botchcli @@ -0,0 +1,17 @@ +#!/bin/bash + +SUBCHAR=! + +[[ "$*" =~ $SUBCHAR ]] && WORK=$* || WORK="$* $SUBCHAR" + +echo -n "[botchcli] $WORK> " +while read LINE; do + if [ "x$LINE" == "x" ] ; then + echo -n + elif [ "x${LINE,,}" == "xquit" ] ; then + exit 0 + else + ${WORK/$SUBCHAR/$LINE} + fi + echo -n "[botchcli] $WORK> " +done |