bin/lnav-forwarded-logs
2023-06-03 17:02:02 -05:00

11 lines
241 B
Bash
Executable File

#!/usr/bin/env bash
FORWARDED_LOGS=$(sudo find /var/log -type f -name "forwarded-logs.log")
if [[ -n "$FORWARDED_LOGS" ]]; then
echo "$FORWARDED_LOGS" | xargs sudo lnav
else
echo "No forwarded logs found in /var/log"
exit 1
fi