Last active
December 2, 2020 22:46
-
-
Save scicco/65544e110cc7c4dc549d0799750f6524 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
for listfile in /var/lib/dpkg/info/*.list; do | |
listfilename=$(basename -- "$listfile") | |
listfilename="${listfilename%.*}" | |
echo ${listfilename} | |
#break | |
output=$(file ${listfile}| awk '{print $2}') | |
#echo "${output}" | |
if [[ $output == *"data"* ]]; then | |
echo "${listfile} is DATA!" | |
echo "mv $listfile "${listfile}.broken" || exit $?" | |
mv $listfile "${listfile}.broken" || exit $? | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment