converting a mult-line file into a single string

Useful for converting PEM files for adding to things like JSON.

 

awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' filename.pem