1 2 3 4 5
#!/sbin/sh SERV_NAME=$(echo "$1" | sed 's/\/log$//') SVDIR="$HOME"/.local/sv SVLOGDIR="$HOME"/.local/log [ -f "$SVLOGDIR/$SERV_NAME"/current ] && tac "$SVLOGDIR"/"$(echo "$1" | sed 's/\/log$//')"/current | less || echo "Cannot read log"