Bug 64361 - fmt splitting earlier than expected
Summary: fmt splitting earlier than expected
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils   
(Show other bugs)
Version: 3
Hardware: i686
OS: Linux
medium
low
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-05-02 21:33 UTC by Robert Citek
Modified: 2007-11-30 22:10 UTC (History)
0 users

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: ---


Attachments (Terms of Use)

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



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