initial commit
This commit is contained in:
10
error-in-logs.sh
Normal file
10
error-in-logs.sh
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Define the log file to search
|
||||||
|
log_file="/var/log/syslog"
|
||||||
|
|
||||||
|
# Define the error keyword to search for
|
||||||
|
error_keyword="ERROR"
|
||||||
|
|
||||||
|
# Should return the line(s) with ERROR in them.
|
||||||
|
grep -n "$error_keyword" "$log_file"
|
||||||
Reference in New Issue
Block a user