Package: textutils
Version: 2.0-2
Severity: normal

Thhe field  separator (a character) given  with the -t  option should be
used for  both input and output.   But, when joining  two files containg
tabs and spaces, using
  join -t "\t"
the  tab is  correctly interpreted  on  input, but  all whitespaces  are
collapsed into a single space on output.

Two problems  here: the  spaces should not  be collapsed, and  the field
separator on output should be a tab, not a space.

To reproduce (beware of spaces and tabs!):

===File ~/tmp/join-bug/arping.table=========================
[00:50:DA:47:94:F7]     146.48.80.130   389.790ms
[00:50:DA:47:94:F7]     146.48.80.131   318.595ms
[00:50:DA:47:94:F7]     146.48.80.132   369.917ms
============================================================

===File ~/tmp/join-bug/ip.table=============================
146.48.80.130   dns.cnuce.cnr.it          
146.48.80.131   seal4.cnuce.cnr.it        
146.48.80.132   seal5.cnuce.cnr.it        
============================================================

Then:

$ join -t "     " -1 2 -o 1.1,0,2.2,1.3 arping.table ip.table 
[00:50:DA:47:94:F7] 146.48.80.130 dns.cnuce.cnr.it 389.790ms
[00:50:DA:47:94:F7] 146.48.80.131 seal4.cnuce.cnr.it 318.595ms
[00:50:DA:47:94:F7] 146.48.80.132 seal5.cnuce.cnr.it 369.917ms

Notice how the separator is a space, and how the trailing space has
disappeared from dns.cnuce.cnr.it.

-- System Information
Debian Release: 2.2
Kernel Version: Linux pot 2.2.13 #14 Mon Mar 13 12:38:41 CET 2000 i686 unknown

Versions of the packages textutils depends on:
ii  libc6          2.1.3-10       GNU C Library: Shared libraries and Timezone

Reply via email to