Occasionally, I need to quote text in an email that I originally received through another channel. For instance, imagine you have an online form submission that gets recorded in a spreadsheet, and you want to reply to the submission via email. In a case like this, you’d copy the text from the spreadsheet, paste it into your email client, and prepare your response. To make the reply look 'natural', you might want to quote the original text with the '>' character and perhaps wrap the lines at around 50 characters for readability. Here’s a Bash one-liner that accomplishes this:
cat noquotes.txt | fold -s -w 50 | sed 's/^/> /'
You're welcome!
No comments:
Post a Comment