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

Posted: June 14, 2016. At: 3:55 PM. This was 2 years ago. Post ID: 9262
Page permalink.
WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters. These cookies expire two weeks after they are set.

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