Re: [CentOS] Need to split long lines in mail archives

2012-04-10 Thread John Doe
From: James B. Byrne > What I would like to discover is the functional equivalent > of this: > find /path/to/archives/*.html -print | xargs -I {} fmt -s > {} > {} > This syntax does not work of course because the xargs file > name substitution only occurs once in the initial argument > list of th

Re: [CentOS] Need to split long lines in mail archives

2012-04-09 Thread Karl Vogel
>> On Mon, 9 Apr 2012 13:09:59 -0400, >> "James B. Byrne" said: J> I am investigating how to split long lines present in a Mailman J> generated html archives. Mailman places the email bodies within J> tags and some users have MUAs that send entire paragraphs as J> one long line. A Perl mod

Re: [CentOS] Need to split long lines in mail archives

2012-04-09 Thread Paul Heinlein
On Mon, 9 Apr 2012, Woodchuck wrote: fmt -flagswhatever FILENAME >/tmp/mytemp mv /tmp/mytemp FILENAME You might find the tidy utility (http://tidy.sourceforge.net/) handy for this operation. It accepts the "-wrap N" option, which works great in my toolchains, but I've never tried it on Mailman

Re: [CentOS] Need to split long lines in mail archives

2012-04-09 Thread fred smith
On Mon, Apr 09, 2012 at 01:09:59PM -0400, James B. Byrne wrote: > CentOS-6.2 > > I am investigating how to split long lines present in a > Mailman generated html archives. Mailman places the email > bodies within tags and some users have MUAs > that send entire paragraphs as one long line. > >

Re: [CentOS] Need to split long lines in mail archives

2012-04-09 Thread ken
Sounds like you need to loop through a bunch of files and process each separately... so: $!/bin/bash cd /path/to/archives/ for $f in $(find . -name *.html) do fmt -s $f > $f.out mv $f.out $f # rename back to original name done Untested. But this is basically what you want to do. And it's a g

Re: [CentOS] Need to split long lines in mail archives

2012-04-09 Thread Woodchuck
On Mon, Apr 9, 2012 at 1:09 PM, James B. Byrne wrote: > CentOS-6.2 > > I am investigating how to split long lines present in a > Mailman generated html archives.  Mailman places the email > bodies within tags and some users have MUAs > that send entire paragraphs as one long line. Such users are

[CentOS] Need to split long lines in mail archives

2012-04-09 Thread James B. Byrne
CentOS-6.2 I am investigating how to split long lines present in a Mailman generated html archives. Mailman places the email bodies within tags and some users have MUAs that send entire paragraphs as one long line. I have looked at fmt and fold but these assume a pipeline from stdout to a fixed