rs(1) damages data

Dominic Fandrey kamikaze at bsdforen.de
Fri Oct 8 09:43:41 UTC 2010


Recently rs has adopted a habit of damaging data in long lines
of input. This can easily be tested:

# 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.

> uname -a
FreeBSD mobileKamikaze.norad 8.1-STABLE FreeBSD 8.1-STABLE #0: Mon Sep  6 17:08:51 CEST 2010     root at mobileKamikaze.norad:/usr/obj/HP6510b-8/amd64/usr/src/sys/HP6510b-8  amd64

--
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail? 


More information about the freebsd-stable mailing list