Created
July 13, 2023 15:56
-
-
Save allada/0ae5dfd8cedbb038ff0b2fd28dfeb0bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f -print0 | xargs -0 ls -l | awk '{print $5}' | \ | |
awk ' | |
#! /bin/env awk | |
# PWLF Interpolation function, take a value, and two arrays for X & Y | |
function pwlf(x, ny) { | |
return ny[int(length(ny) * x) / 100] | |
} | |
# Read f Input in yy array, setup xx | |
{ yy[n] = $1 ; n++ } | |
# Print the table | |
END { | |
# Sort values of yy | |
ny = asort(yy) ; | |
# Prepare list of requested results | |
ns = split("99 97 95 90 80 70 60 50 40 30 20 10 5 3 1", pv) | |
for (i=1 ; i<=ns ; i++) printf "%dth %d\n", pv[i], pwlf(pv[i], yy) ; | |
} | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment