6 lines
327 B
Bash
6 lines
327 B
Bash
#!/bin/bash
|
|
nc -k -l 34567 | perl -e 'while (<>) {
|
|
($dttz,$id,$filter,$grep,$stream,$msg) = $_ =~ / ([+-:T0-9]*).*filter@([0-9]*).*filter="(.*)" grep="(.*)".*stream@[0-9]* stream="(.*)"] (.*)$/;
|
|
printf "DTTZ \"%s\" ID \"%d\" Stream \"%s\" Filter \"%s\" Grep \"%s\" Msg \"%s\"\n", $dttz, $id, $stream, $filter, $grep, $msg;
|
|
}'
|