Bash: how to cleanly log processed lines of ssh/ bash output?
问题 I wrote a linux bash script with tee and grep to log and timestamp the actions I take in my various ssh sessions. It works, but the logged lines are mixed together sometimes and are full of control characters. How can I properly escape control and other characters not visible in the original sessions and log each line separately? I am learning bash and the linux interface, so any other suggestions to improve the script would be extremely welcome! Here is my script (used as a wrapper for the