Comment 0 for bug 868747

Revision history for this message
jimav (james-avera) wrote :

Strictly speaking this is an enhancement request.

fmt imposes an artificial limit on the maximum output line length controlled by the -f option, which prevents using this tool to "join" together all lines in each paragraph (for any paragraph size). This operation is necessary to prepare plain-text for import into a word processor such as LibreOffice, where "manual line breaks" (i.e. newlines in the middle of paragraphs) are undesirable. If fmt could be run with an effectively unlimited max line length, then it coiuld be used for this purpose.

Ideally there would be a way to specify an explicitly unlimited output line length (say, -f -1).

SUMMARY:
  fmt -f 9999 file.txt gives error "invalid width". It should accept an arbitrarily-large value (up to max 32-bit integer).
  Ideally, an option would allow specifying an explicitly unlimited (or maximum) output line length.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: coreutils 8.5-1ubuntu3
ProcVersionSignature: Ubuntu 2.6.35-30.59-generic 2.6.35.13
Uname: Linux 2.6.35-30-generic x86_64
Architecture: amd64
Date: Wed Oct 5 14:45:27 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release Candidate amd64 (20100928)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: coreutils