summaryrefslogtreecommitdiff
path: root/botchcli
blob: 5dfa0f71db86c8e307fff318d4acc5c9d657ec67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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