Created
November 10, 2017 16:55
-
-
Save classmember/84731d36524e1ae56d05c3c67504623a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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