Skip to content

Instantly share code, notes, and snippets.

@classmember
Created November 10, 2017 16:55
Show Gist options
  • Save classmember/84731d36524e1ae56d05c3c67504623a to your computer and use it in GitHub Desktop.
Save classmember/84731d36524e1ae56d05c3c67504623a to your computer and use it in GitHub Desktop.
#!/bin/sh
# tail_logs.sh
tail_logs() {
# arguments: IP addresses to search for in logs.
files='/usr/local/apache/access_log
/usr/local/apache/error_log
/var/log/nginx/access.log
/var/log/nginx/error.log'
tail -f ${files} | grep $@
}
tail_logs 127.0.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment