Bug 64361 - fmt splitting earlier than expected
fmt splitting earlier than expected
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
3
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-05-02 17:33 EDT by Robert Citek
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 5.2.1-48.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-12-16 08:33:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Robert Citek 2002-05-02 17:33:27 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Description of problem:
I believe I have found a bug in fmt, one of the textutils programs. 
Here's the script:
#!/bin/bash
for i in $(seq -w 4052 1 4053) ; do 
  echo -n "$i: " ; seq -w 0 10000 | fmt -w $i | head -1 | wc
done
 Notice the drop in word count (631 -> 321) even though the 
width option to fmt was increased by one.
 Here's a similar version where you can see the ouput:
#!/bin/bash
for i in $(seq -w 4052 1 4053) ; do 
  echo -n "$i: " ; seq -w 0 10000 | fmt -w $i | head -2
done 

No data is lost. fmt is just splitting earlier than expected.


Version-Release number of selected component (if applicable):
  textutils-2.0.11-7

How reproducible:
Always

Steps to Reproduce:
1.see description for mini script
2.
3.
	

Actual Results:  fmt split earlier than expected

Expected Results:  a longer line

Additional info:
Comment 1 Tim Waugh 2005-12-16 08:33:12 EST
This no longer happens in FC4.

$ for i in $(seq -w 4052 1 4053) ; do
>   echo -n "$i: " ; seq -w 0 10000 | fmt -w $i | head -1 | wc
> done
4052:       1     631    3786
4053:       1     632    3792

Note You need to log in before you can comment on or make changes to this bug.