0

Requirements

Must run on Linux, MacOS, and Windows (only recent versions would be fine, no legacy support is needed).

Must be implemented in one of the pre-commit supported languages, except "docker or "system".

Inputs: A locale like "en_NZ.UTF-8" and a filename.

Side effects: The file is sorted according to the given locale.

Outputs: Nothing.

Basically I'm looking for a cross-platform equivalent of the POSIX/GNU sort LC_COLLATE=en_NZ.UTF-8 sort -o FILE FILE. This is for my pre-commit hook, to support all the major platforms.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy