Monitor a log file and execute commands based on patterns
#!/bin/sh tail -fn0 /var/log/file.log | while read line ; do ย ย ย ย echo “$line” | grep “pattern” ย ย ย ย if [… Read More »Monitor a log file and execute commands based on patterns
#!/bin/sh tail -fn0 /var/log/file.log | while read line ; do ย ย ย ย echo “$line” | grep “pattern” ย ย ย ย if [… Read More »Monitor a log file and execute commands based on patterns