diff --git a/lnav-forwarded-logs b/lnav-forwarded-logs new file mode 100755 index 0000000..a660c43 --- /dev/null +++ b/lnav-forwarded-logs @@ -0,0 +1,10 @@ +#!/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