If you use webmail, you know that as you reply to messages the quoting will often get messed up with line wrapping. I was looking for a simple solution to handle this, and all I found were programs that did this plus a lot more, and they were shareware. So I wrote a shell script that will do the rewrap, unwrap, increase the quote level, and decrease the quote level. It works by having a parameter passed to it in the following manner:
change_quote.sh increase -- this will rewrap the text on the clipboard and add an additional ">" to the beginning of each new line. The full usage is as follows:
change_quote.sh (increase|decrease|rewrap|unwrap)
The package contains five scripts: one that does all the work, and four others that simply call the script with the appropriate parameter. I put the collection in ~/Library/Scripts, and access it from the system-wide Scripts menu. It works for any text on the clipboard, and copies the resultant changes to the clipboard.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20080606161724600