#!/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