Skip to content

Instantly share code, notes, and snippets.

@handakumbura
Created July 2, 2016 10:39
Show Gist options
  • Save handakumbura/a39ff9cdca22057b92036f7310f06960 to your computer and use it in GitHub Desktop.
Save handakumbura/a39ff9cdca22057b92036f7310f06960 to your computer and use it in GitHub Desktop.
grep out a log tail to a separate file
#!/bin/bash
tail -f $1 | grep -e -B $2 -A $3 $4 >> GREPOUT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment