Peng Yu
2018-02-09 14:21:00 UTC
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.
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
Regards,
Peng