Created
November 7, 2015 16:59
-
-
Save parisminton/aaa7e42888d7ba923eee to your computer and use it in GitHub Desktop.
Loop through filenames and operate on the ones that *don't* match a pattern
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
for i in $(ls ~/wherevs/*.png); do | |
if [ ! $(echo $i | ack whatevs) ]; then | |
rm -P $i | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment