delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/03/17/10:47:18

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <003901c40c36$bf36e670$450210ac@tcgp.dundee.ac.uk>
Reply-To: <fergus AT bonhard DOT uklinux DOT net>
From: <fergus AT bonhard DOT uklinux DOT net>
To: <cygwin AT cygwin DOT com>
Cc: <fergus AT bonhard DOT uklinux DOT net>
Subject: fmt: strange decisions "when to wrap"
Date: Wed, 17 Mar 2004 15:44:04 -0000
MIME-Version: 1.0
X-UoD-Spam-Score: -4.7 (----)
X-UoD-Spam-Report: -------------------------------------------------- This message has been scanned by a SpamAssassin installation on the spam checking server hughnew at the University of Dundee. Content analysis details: (-4.7 hits, 5.0 required) 0.2 NO_REAL_NAME From: does not include a real name -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000]
X-UoD-Scan-Signature: e2e6ae423539985331237dcdbacb932d
Note-from-DJ: This may be spam

This has to be a fmt problem, I think, but thought I'd check with other
users and see whether any of you have experienced it or similar, or tried
using par instead as a solution.

The file doc1 is a text file chunked into paragraphs wrapped at 80 and
separated by a blank line. The requirement is the simplest possible: turn
each para into one long line. (I have already checked that doc1 contains no
tabs or ^M's or any other untidy punctuation.) I am using the command

    fmt -16000 doc1 > doc2

on the assumption (true, in fact) that no para contains more than 16000
characters. However, doc2 still contains occasional newlines where it
shouldn't (in the middle of what were the original paragraphs). No evident
pattern in occurrence, frequency, location ... column numbers at the site of
such an occurrence can be in the low or high hundreds.

(It does seem that following the intrusive newline there is always just one
word to the end of the original para ...)

I've tried the same thing with -8000 and -32000 ... same phenomenon,
different instances of it.

Any explanation? Should I try par (which seems a bit of a sledgehammer for a
very simple requirement).

Thank you.

Fergus


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019