Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I started implementing the C++ aggregator for FreeBSD that corresponds to
sort
.It doesn't support any flags and doesn't pass the unit test yet.It passes the basic unit test now (the version with no flags). The flags that are yet to be implemented:u
. Sort in unique moden
. Sort treating lines as numbers (remember about leading minus, decimal point or comma and thousands separator)r
. Reverse sort directionk[...]
. Sort by columnsf
.toupper
before sortingb
. Ignore whitespace at the beginning of a lined
. "consider only blanks and alphanumeric characters"There are also some other options, but they don't seem as easy to implement at first glance. All of the options above are also supported in FreeBSD and are the same. One thing that could be tricky is dealing with locales.