coreutils: seq puts the separator on wrong spot!

Bug #1161073 reported by MMlosh
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
coreutils (Ubuntu)
Fix Released
Low
Unassigned
Nominated for Saucy by Rolf Leggewie

Bug Description

$ seq -s, 5

Expected: 1,2,3,4,5
Got: 1\n2,3,4,5,

(\n denotes a newline)

Also note the extreme difference between outputs of these
$ seq -s ',' 5
1\n2,3,4,5,

$ seq -s ', ' 5
1, 2, 3, 4, 5\n

MMlosh (mmlosh)
description: updated
tags: added: raring regression-release
Revision history for this message
C de-Avillez (hggdh2) wrote :

Thank you for opening this bug and helping make Ubuntu better. First of all, please use 'ubuntu-bug coreutils' next time, so that a minimum of information can be automatically collected (like, for example, package version, coreutils version).

I can confirm this on coreutils 8.20 (Raring, version 8.20-3ubuntu5):

[cerdea-aws]cerdea@xango3:/build/buildd/coreutils$ seq --version
seq (GNU coreutils) 8.20
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Ulrich Drepper.
[cerdea-aws]cerdea@xango3:/build/buildd/coreutils$ seq -s, 5
1
2,3,4,5,[cerdea-aws]cerdea@xango3:/build/buildd/coreutils$

But I cannot see it on a more up-to-date coreutils:

[cerdea-aws]cerdea@xango3:/build/buildd/coreutils$ src/seq --version
seq (GNU coreutils) 8.21.20-2c2d0
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Ulrich Drepper.
[cerdea-aws]cerdea@xango3:/build/buildd/coreutils$ src/seq -s, 5
1,2,3,4,5
[cerdea-aws]cerdea@xango3:/build/buildd/coreutils$

So I will check as soon as possible for the fix.

Changed in coreutils (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
MMlosh (mmlosh) wrote :

I noticed another separator issue with "seq" (also coreutils, same version)

I tried to sort a .csv file containing the following lines by the 2nd column....
38,41,10,7
70,37,23,10

using
sort -nr -t, -k2

That happily worked in Quantal, but does only something weird in Raring.

I expect the entire coreutils package to be separator-defective. No wonder it's stuck in debian Sid and didn't go in Jessie...

Revision history for this message
MMlosh (mmlosh) wrote :

OOPs.. The issue is with "sort"

summary: - seq puts the separator on wrong spot!
+ coreutils: seq puts the separator on wrong spot! ; sort does not sort by
+ the given field with a non-default separator
Revision history for this message
MMlosh (mmlosh) wrote : Re: coreutils: seq puts the separator on wrong spot! ; sort does not sort by the given field with a non-default separator

I'd also like to dispute the importance....
Silent csv sorting failure almost made me make a wrong decision.

Revision history for this message
C de-Avillez (hggdh2) wrote :

@MMlosh: please open a new bug for the sort issue. We track one issue only per bug.

summary: - coreutils: seq puts the separator on wrong spot! ; sort does not sort by
- the given field with a non-default separator
+ coreutils: seq puts the separator on wrong spot!
Revision history for this message
MMlosh (mmlosh) wrote :

Update: The sort issue actually exists in Quantal (8.13-3.2ubuntu2) / Quantal-updates (8.13-3.2ubuntu2.1), while the seq issue does not.
It actually exists even with the coreutils from Precise. I guess that comes from a library?
I'll report a separate bug when i figure out the details

Revision history for this message
Stephan Diestelhorst (syon) wrote :

This is fixed upstream with coreutils 8.21. I would like to ask for an update, including raring.
Upstream commit:
http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=76f606a9544bd67629bd4766ff6efe8bf42b20d9

Revision history for this message
Rolf Leggewie (r0lf) wrote :

coreutils 8.21 is in trusty and I can confirm the problem is not as described. I close the ticket as fixed with a request for a backport to raring and saucy. But I would say not to hold your breath for that.

Changed in coreutils (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

"not as described" = does not affect trusty

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.