Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Oct 2010 06:09:06 GMT
From:      Dominic Fandrey <kamikaze@bsdforen.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/151384: rs(1) damages data
Message-ID:  <201010110609.o9B696bo037279@www.freebsd.org>
Resent-Message-ID: <201010110610.o9B6A1F2093642@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         151384
>Category:       bin
>Synopsis:       rs(1) damages data
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 11 06:10:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Dominic Fandrey
>Release:        RELENG_8
>Organization:
private
>Environment:
FreeBSD mobileKamikaze.norad 8.1-STABLE FreeBSD 8.1-STABLE #0: Mon Sep  6 17:08:51 CEST 2010     root@mobileKamikaze.norad:/usr/obj/HP6510b-8/amd64/usr/src/sys/HP6510b-8  amd64
>Description:
Recently rs has adopted a habit of damaging data in long lines
of input. I've been relying on it to reformat dependency data,
I had to switch to sed, which has a slight performance impact
for my use case.
>How-To-Repeat:
# jot -s\  -b 01234567 1000 | rs 0 1 | grep -vxF 01234567
012345
67
012
34567
012345
67
012
34567
012345
67
012
34567

The jot command prints the string 01234567 a thousand times in
a single row.

The rs command is supposed to generate an automatic(0) number of
rows with 1 column per row. I.e. every word stands in its own line.

The grep filters all intact words, so everything that is printed,
was damaged by rs.

This has the look of a repetitive pattern to me, probably this
happens at a fixed buffer boundary.

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010110609.o9B696bo037279>