Created
June 18, 2021 13:53
-
-
Save m-rey/e945ef1c2aeeff504e887ac5f750eda2 to your computer and use it in GitHub Desktop.
parse local .desktop files for MIME types and output thom ordered by frecuency. You may have to adjust your shell config or the code to either enable globbing or rewrite the oneliner.
This file contains hidden or 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
| #!/bin/zsh | |
| grep -hoP '(?<=MimeType=).*(?=(;|\n))' ~/.local/share/applications/**/*.desktop /usr/share/applications/**/*.desktop | tr ';' '\n' | tr -d "[:blank:]" | sort | uniq -c | sort -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment