Hello, scripting in Bash with ssh remote command, I figured out, that ssh error message is CRLF terminated: $ ssh -V OpenSSH_7.4p1 Debian-10+deb9u1, OpenSSL 1.0.2l 25 May 2017 $ ssh foo_bar_host 2>error_msg.txt $ vi -b error_msg.txt ssh: Could not resolve hostname foo_bar_host: Name or service not known^M (^M at the end of line indicates CRLF EOL). So I needed to do a tr -d '\r' on the error output to make sed regular expression $ working again. Because with the CRLF EOL above sed -e 's#$#append_something#' does not work, the EOL is not found by sed when there is CRLF EOL. So I am wondering why there is CRLF EOL. Not helpful on Unix machines. Here is already the same question asked 13 years ago, not yet been answered, unfortunately: "Why are error messages CRLF terminated?" https://marc.info/?l=openssh-unix-dev&m=108378631808225&w=2 _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@xxxxxxxxxxx https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev