help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] native support for CRLF in heredoc


From: Peng Yu
Subject: [Help-bash] native support for CRLF in heredoc
Date: Fri, 9 Feb 2018 08:21:00 -0600

Hi,

I use `sed` to support CRLF in heredoc.

sed 's/$/\r/g' <<EOF | nc -v httpbin.org 80
GET /get HTTP/1.1
Host:httpbin.org

EOF

Ideally, I would like something simpler (of course the following does
not work as expected).

nc -v httpbin.org 80
GET /get HTTP/1.1
Host:httpbin.org

EOF

Does anybody know anything more native to bash that support CRLF in
heredoc? Thanks.


-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]