If I assign a variable in Bash like so:
and then immediately dump that to a file:
echo $PRIVATE_KEY > tmp.txt
and then compare this to the original:
diff ~/.ssh/id_rsa tmp.txt
I do not get a match as all of the carriage returns (or maybe it's line feeds) have been stripped off in the original variable assignment. How do I avoid this?