trackl.sh (425B)
1 #!/bin/bash 2 3 trap 'kill $(jobs -p)' EXIT 4 5 mkdir -p trackl 6 cd trackl 7 mkfifo fifo 2>/dev/null 8 mkfifo fifo2 2>/dev/null 9 10 cat fifo | ../../irctk -u trackls@localhost \#trackl_test > fifo2 & 11 PID=$! 12 (cat fifo2 | while read l; do 13 echo "trackll: 1" 14 echo "blah"; 15 echo "[#trackl_test] trackll: 2"; 16 done >fifo) & 17 sleep 1 18 echo "foo" | ../../irctk -F trackll@localhost \#trackl_test >heard 19 sleep 2 20 kill $PID 21 22 diff heard <(seq 2) 23