Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
# Shell
Schell Scripts
# Check if an ERROR exists in a log file

#!/bin/bash

LOG_FILE="/var/log/app.log"

if grep -i "error" "$LOG_FILE" > /dev/null; then
echo "❌ ERROR found in log file!"
else
echo "✅ No errors found."
fi