Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase Portability to BSD #26

Merged
merged 1 commit into from
Jun 20, 2019
Merged

Increase Portability to BSD #26

merged 1 commit into from
Jun 20, 2019

Conversation

btdn
Copy link
Contributor

@btdn btdn commented Jan 29, 2019

As described in the info page for GNU sort:

‘-g’
‘--general-numeric-sort’
‘--sort=general-numeric’
Sort numerically, converting a prefix of each line to a long
double-precision floating point number. *Note Floating point::.
Do not report overflow, underflow, or conversion errors. Use the
following collating sequence:

  • Lines that do not start with numbers (all considered to be equal).
  • NaNs (“Not a Number” values, in IEEE floating point arithmetic) in a consistent but machine-dependent order.
  • Minus infinity.
  • Finite numbers in ascending numeric order (with -0 and + equal).
  • Plus infinity.

Use this option only if there is no alternative; it is much slower
than ‘--numeric-sort’ (‘-n’) and it can lose information when
converting to floating point.

It, however, is not portable.

md5sum and the flags for stat also aren't portable. I added commented out versions that work on NetBSD but, since an error at that point doesn't prevent the process from completing, I didn't bother with a more robust solution.

@wbrenna wbrenna merged commit c37c821 into wbrenna:master Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants