Bug 64361

Summary: fmt splitting earlier than expected
Product: [Fedora] Fedora Reporter: Robert Citek <rwcitek>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: low Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: 5.2.1-48.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-12-16 13:33:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robert Citek 2002-05-02 21:33:27 UTC
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 13:33:12 UTC
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