Skip to content

Instantly share code, notes, and snippets.

@compor
Created September 16, 2017 14:40
Show Gist options
  • Save compor/76ed11a778a3d0927a0a86f76d91f4ba to your computer and use it in GitHub Desktop.
Save compor/76ed11a778a3d0927a0a86f76d91f4ba to your computer and use it in GitHub Desktop.
# 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