[CentOS] Need to split long lines in mail archives

John Doe jdmls at yahoo.com
Tue Apr 10 10:00:15 UTC 2012


From: James B. Byrne <byrnejb at harte-lyne.ca>

> 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 the following command. But, this example does
> describe the effect I wish to obtain, to have the original
> file name receive the reformatted contents.

What about a simple:
find ... | while read F; do ... "$F"; done

JD



More information about the CentOS mailing list