irctk

libircclient binding for scripts
git clone https://a3nm.net/git/irctk/
Log | Files | Refs | README

fprune.sh (402B)


      1 #!/bin/bash
      2 
      3 trap 'kill $(jobs -p)' EXIT
      4 
      5 mkdir -p fprune
      6 cd fprune
      7 mkfifo fifo 2> /dev/null
      8 
      9 seq 3 | sed 's/^/good/' > ref
     10 cat fifo | ../../irctk -F fprunei@localhost \#fprune_test > heard &
     11 PID=$!
     12 sleep 1
     13 cat > input <<EOF
     14 blah
     15  fprunei:good1
     16    fprunei2: bleh
     17 fprunei     good2
     18 fprune_i nblah
     19  fprunei,  good3
     20 EOF
     21 ../../irctk fpruneo@localhost \#fprune_test < input
     22 sleep 1
     23 kill $PID
     24 diff ref heard