[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Program for quoting text like in email?



>> Can anyone recommend a program/shell script/editor plugin etc, that
>> can take arbitrary text as input and quote it like email programs
>> quote emails with a preceding "> " character?
>>
>> I'm about to reply to a very long facebook message and want to quote
>> it and make inline replies. But facebook only supports top-posting.
>> I'd like to cut-n-paste the text I wish to reply, quote it with "> "
>> and then cut-n-paste it back into my facebook reply message. I'd also
>> like line breaks to be put in once every 80 characters (email
>> standard?).
>
> How about passing the text through fmt -w 80|sed 's/^/> //'?
> (Untested). That should do what you desire, as fmt would format the
> paragraphs, and sed would substitute every beginning of line with a ">
> ".

I got this output:

tommy@todu:~/code$ cat test.txt | fmt -w 80|sed 's/^/> //'
sed: -e expression #1, char 8: unknown option to `s'
tommy@todu:~/code$

However, thanks for letting me know about the "fmt" command. I hadn't
heard of it before. I'll experiment with your solution too, later
though, as I also have to write my long postponed facebook reply ;).

-- 
Regards,

Thomas Anderson
"Quidquid latine dictum sit, altum sonatur"


Reply to: