bin/190099: BSD sort - merge sort don't work for stdin

Anton Yuzhaninov citrin+pr at
Thu May 22 09:50:05 UTC 2014

>Number:         190099
>Category:       bin
>Synopsis:       BSD sort - merge sort don't work for stdin
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 22 09:50:04 UTC 2014
>Originator:     Anton Yuzhaninov
>Release:        FreeBSD 10.0-STABLE-20140515 amd64
System: FreeBSD 10.0-STABLE-20140515 FreeBSD 10.0-STABLE-20140515 #0 r266115M: Thu May 15 07:47:52 UTC 2014 root at amd64

	There is regression in BSD sort compared to GNU sort --merge option
	no longer works for stdin

	Upgrade from FreeBSD 8 to FreeBSD 10 caused breakage of our scripts
	where used constructions like:
	script_foo | sort ... | cut ... | sort -mu -k 1,1 | script_bar


:~> cat ttt
key1    foo
key1    bar
key2    xzy
:~> cat ttt | sort -mu -k 1,1
:~> sort --version

Expected result:

:~> cat ttt | sort -mu -k 1,1
key1    foo
key2    xzy
:~> sort --version
sort (GNU coreutils) 5.3.0-20040812-FreeBSD
Written by Mike Haertel and Paul Eggert.



More information about the freebsd-bugs mailing list