swh:1:snp:7438b129d9cacb54440879827822fdf5f107e828
Raw File
Tip revision: 30a5073632a858bc49e9d7f823e76738c01495db authored by Andrea Censi on 02 October 2018, 11:52:40 UTC
fix
Tip revision: 30a5073
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