Re: Program for quoting text like in email?
On Mon, Jun 8, 2009 at 11:27 AM, Thomas Anderson wrote:
>> 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$
OK, so I guess it should be sed 's/^/> /'. Anyway, experiment this
method too, sometime. It's fun to know the possibilities with sed, awk
and friends.
Kumar
--
Kumar
Reply to: