Created
June 4, 2014 08:51
-
-
Save compor/75d1f6f0a49645af7206 to your computer and use it in GitHub Desktop.
detects Linux DSO name forms and associates versioned suffix names with a single base name for a library
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
# need to use --posix or --re-interval | |
$0 ~ /^lib[^.]+\.so(.[0-9]+){0,3}$/ { | |
n = split($0, a, ".") | |
dso_basename = a[1]; | |
suffix = "" | |
for(i = 2; i <= n; i++) { | |
suffix = suffix"."a[i] | |
} | |
dso[dso_basename] = dso[dso_basename]"|"suffix; | |
} | |
END { | |
for(i in dso) | |
printf("%s : %s\n", i, dso[i]); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment