With ChatGPT's help I came up with
#!/bin/bash
tail -f LOGLINK/error.log &
TAIL_PID=$!
while true; do
read -n 1 key
if [[ $key == "c" ]]; then
clear
fi
done
ctrl-l wasn't working to clear the screen, so I could get a fresher view of new errors, but now I can just press c.
No comments:
Post a Comment