Linux Terminal command to format PGP to properly display on reddit.

So it was brought to my attention that a command in Linux exist that makes what I made obsolete. Here is the code you can run in the terminal. Simply save your PGP message, name it something, and place it on your Desktop and replace FILENAME with the name of the file you saved the PGP message as.

cat ~/Desktop/FILENAME | sed 's|^|    |g'

then it will print the formatted message into the terminal, highlight it and right click and click “copy” ctrl+c does not copy inside terminal.

Or like this.

cat ~/Desktop/FILENAME | sed 's|^|    |g' > output.txt

This will output the modified code to the file output.txt.

No comments have been made. Use this form to start the conversation :)

Leave a Reply