Revision dfd87165a820d0b489adc1b9dd416a71aa87ddfb authored by lpaull on 09 November 2018, 20:48:50 UTC, committed by lpaull on 09 November 2018, 20:48:50 UTC
1 parent d36ce52
Raw File
try.sh
#!/bin/bash

PIPE=/tmp/catpipe
trap "rm -f $PIPE" exit 1
[[ ! -p $PIPE ]] && mkfifo $PIPE

while true; do
     while read line; do
          case "$line" in
               @exit) rm -f $PIPE && exit 0;;
               @*) eval "${line#@}" ;;
               * ) echo "$line" ;;
          esac
     done <$PIPE
done

exit 2
back to top