Skip to main content
add stdbuf to prevent kernel buffering of output
Source Link
FloHimself
  • 11.8k
  • 3
  • 24
  • 24

Maybe you can use awk's range patterns here:

tail -f logfile | awk '/ddddddddddddddd/,/hhhhhhhhhhhhhhh/'

If you need to circumvent the SIGPIPE problem you can use socat instead of tail for the job:

socat -u file:logfile,ignoreeof 'exec"system:"awk'stdbuf -o0 awk /ddddddddddddddd/,/hhhhhhhhhhhhhhh/"''" > logfile.new

Maybe you can use awk's range patterns here:

tail -f logfile | awk '/ddddddddddddddd/,/hhhhhhhhhhhhhhh/'

If you need to circumvent the SIGPIPE problem you can use socat instead of tail for the job:

socat -u file:logfile,ignoreeof 'exec:"awk /ddddddddddddddd/,/hhhhhhhhhhhhhhh/"'

Maybe you can use awk's range patterns here:

tail -f logfile | awk '/ddddddddddddddd/,/hhhhhhhhhhhhhhh/'

If you need to circumvent the SIGPIPE problem you can use socat instead of tail for the job:

socat -u file:logfile,ignoreeof "system:'stdbuf -o0 awk /ddddddddddddddd/,/hhhhhhhhhhhhhhh/'" > logfile.new
added 204 characters in body
Source Link
FloHimself
  • 11.8k
  • 3
  • 24
  • 24

Maybe you can use awk's range patterns here:

tail -f logfile | awk '/ddddddddddddddd/,/hhhhhhhhhhhhhhh/'

If you need to circumvent the SIGPIPE problem you can use socat instead of tail for the job:

socat -u file:logfile,ignoreeof 'exec:"awk /ddddddddddddddd/,/hhhhhhhhhhhhhhh/"'

Maybe you can use awk's range patterns here:

tail -f logfile | awk '/ddddddddddddddd/,/hhhhhhhhhhhhhhh/'

Maybe you can use awk's range patterns here:

tail -f logfile | awk '/ddddddddddddddd/,/hhhhhhhhhhhhhhh/'

If you need to circumvent the SIGPIPE problem you can use socat instead of tail for the job:

socat -u file:logfile,ignoreeof 'exec:"awk /ddddddddddddddd/,/hhhhhhhhhhhhhhh/"'
Source Link
FloHimself
  • 11.8k
  • 3
  • 24
  • 24

Maybe you can use awk's range patterns here:

tail -f logfile | awk '/ddddddddddddddd/,/hhhhhhhhhhhhhhh/'