From b0a14e013b318fa87714414b8ece95780527bddf Mon Sep 17 00:00:00 2001 From: Nathan Lasseter Date: Fri, 18 Sep 2015 11:51:28 +0100 Subject: Initial commit --- botchcli | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 botchcli (limited to 'botchcli') 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 -- cgit v1.2.3