Discussion:
bug#32308: join doesn't ignore trailing whitespace
(too old to reply)
Dima Kogan
2018-07-30 03:11:04 UTC
Permalink
Hi. It appears that join doesn't ignore trailing whitespace, resulting
in surprising results. I'm attaching two data files. one is the output
of 'seq 5', and the other is the same thing, but with a trailing space
added to each line. Look:

***@scrawny:~$ join -j 1 -e - -o auto /tmp/dat.no.trailing.space /tmp/dat.no.trailing.space
1
2
3
4
5

***@scrawny:~$ join -j 1 -e - -o auto /tmp/dat.trailing.space /tmp/dat.trailing.space
1 - -
2 - -
3 - -
4 - -
5 - -

I guess the manpage isn't explicit about what happens in this case, but
as a user, I find this to be extremely surprising, and this thus feels
like a bug. Thanks.

(I'm not subscribed to the list, so please Cc me in replies)
Assaf Gordon
2018-10-30 03:48:54 UTC
Permalink
severity 32308 wishlist
retitle 32308 doc: join: mention whitespace is significant
stop

Hello,
Post by Dima Kogan
It appears that join doesn't ignore trailing whitespace, resulting
in surprising results.
[...]
Post by Dima Kogan
I guess the manpage isn't explicit about what happens in this case, but
as a user, I find this to be extremely surprising, and this thus feels
like a bug.
I've marked this as a wishlist item - to be improved in the future.

-assaf

Continue reading on narkive:
Loading...