You must log in to comment.

in reply to @ticky's post:

here's some code in case you're lacking inspiration!

import os, fnmatch, platform, re

so_ext = {
        "Darwin": ".dylib",
        "Linux": ".so",
}[platform.uname().system]

for _, _, files in os.walk("/"):
    for filename in fnmatch.filter(files, f"lib*{so_ext}"):
        # Extract the library name
        assert filename.startswith("lib")
        assert filename.endswith(so_ext)
        libname = filename[3:-len(so_ext)]

        # Remove any version numbers
        libname = re.sub(r"[.-]?\d(\.\d)*$", "", libname)
 
        # Print all permutations where one letter is removed.
        for i in range(0, len(libname)):
            print(libname[0:i] + libname[i+1:])