Created
January 19, 2014 19:37
-
-
Save jmorenoamor/8509937 to your computer and use it in GitHub Desktop.
Fix files being converted to directories
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
set -x | |
for qwer in *.{jpg,gif,png}/; | |
do | |
if [[ "$qwer" != "*"* ]] ; then | |
echo "$qwer"; | |
mv "$qwer" "_BCK${qwer}" | |
cat "_BCK${qwer}" > "${qwer}" | |
fi | |
done | |
set +x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment