Last active
March 4, 2016 14:15
-
-
Save rindeal/acd278cf81f5bdc10cb9 to your computer and use it in GitHub Desktop.
Find outdated .desktop files
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/bash - | |
grep -a -r -P -o '(?:(?<=Exec=)([^"]\S+)|(?<=Exec=")(\S+)(?="))' \ | |
-- /{usr,home/*/.local}/share/applications | sort -u | \ | |
while read m; do | |
desktop_file="${m%:*}" | |
exec_name="${m##*:}" | |
if ! command -v "$exec_name" 2>&1 >/dev/null; then | |
echo "$desktop_file|$exec_name" | |
fi | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment