Field delimiter in sort program in freebsd

Shayan Pooya shayan at
Sat Jan 25 23:24:11 UTC 2014

I took a look at the source code of sort and saw this condition:

                                if (sort_opts_vals.field_sep == WEOF) {
                                        errno = EINVAL;
                                        err(2, NULL);

Removing this condition and remaking sort fixes the issue (at least I can
use bash to give 0xff to the sort program, no luck with other shells

Using \xff as the record separator makes sense for binary files. Any idea
why there is such a condition in the sort program?


More information about the freebsd-questions mailing list