initial commit

This commit is contained in:
2024-06-17 13:05:42 +02:00
commit 4c58fd9fae

10
error-in-logs.sh Normal file
View 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"