I have a single-line command that does a curl request to check server status and then output the result to a log file. But the problem is the returned result has no line break and so the log file messes up when the command writes to the log file the next time around.
curl -s "http://myserver.com/api?param=1¶m=2" | sudo tee -a /var/log/myserver.log
I like to keep this to a single-line command. Any suggestion is welcome. Thank you for your time.