0

This question already has an answer here:

I would like to store an HTTP request in a variable and then use it with OpenSSL

I now have

HTTP_REQUEST="HEAD / HTTP/1.1\\nHost: ${HOST_HEADER}\\nUser-Agent: check_ssl_cert/${VERSION}\\nConnection: close\\n\\n"

and then

echo -e '${HTTP_REQUEST}' | openssl s_client -connect ${HOST}:${PORT} ${SERVERNAME} -status 2> /dev/null | grep -A 17 'OCSP response:'

echo e is not POSIX. Is there an alternative?

marked as duplicate by derobert, don_crissti, Kusalananda shell-script Jan 16 at 16:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.