[PLUG] some awk-fu or perl to word wrap a text file?

Michael Rasmussen mikeraz at patch.com
Wed Oct 17 06:02:16 UTC 2007


Don J. wrote:
> My perl skills are still in the very preliminary stages ... might
> anyone know how I could take a large text file that has no hard
> wrapping, and apply hard wraps every 80 characters or so? 
> Any ideas?

fmt -w 80 large_file > new_file
see `man fmt` for details

Not Perl, not a reinvented wheel.

-- 
      Michael Rasmussen, Portland Oregon  
    Be appropriate && Follow your curiosity
          http://www.patch.com/words/ 
  The fortune cookie says:
"Who alone has reason to *lie himself out* of actuality?  He who *suffers*
 from it."
		-- Friedrich Nietzsche




More information about the PLUG mailing list