sort --debug should print the information to stderr instead stdout BSD sort has a flag to display extract information (memory usage, collate, sort method). --debug Print some extra information about the sorting process to the standard output. e.g.: $ cat /dev/null | sort --debug Memory to be used for sorting: 34288343040 Using collate rules of C.UTF-8 locale sort_method=heapsort I do not like that the debug information is printed to the same file descriptor (stdout) as the normal output. $ date | sort | wc -l 1 $ date | sort --debug | wc -l 4 Proposed fix: print the debug information to stderr, similar to GNU sort.