Skip to content

Instantly share code, notes, and snippets.

@avovsya
Created December 15, 2015 09:50
Show Gist options
  • Save avovsya/2e9fab182e18efb2e012 to your computer and use it in GitHub Desktop.
Save avovsya/2e9fab182e18efb2e012 to your computer and use it in GitHub Desktop.
Tail remote logs, grep and count lines
cat <(ssh server1 sudo tail -f /var/log/test.log) <(ssh server2 sudo tail -f /var/log/test.log) | grep /api/1/test >> hits & watch wc -l hits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment