tail -f log | grep keyword | while read line; do tmux send-keys -t 1:1.0 "$line"; done
Really cool idea! But grep awaits EOF to pipe its result... (though it outputs line-by-line if result is not piped onward)How are you getting it to work? I found a --line-buffered option for GNU grep, but I'm using busybox grep...
EDIT OK, in case anyone else wants to know, found I could solve it by putting the grep inside the while loop instead (line=`echo $line | grep keyword`), but I'd still like to hear how you did it... BTW: entering "-" causes send-keys interprets it as an option.. I pr need some data cleansing...