Last active
October 19, 2015 22:05
-
-
Save cdparra/6d48f52a03655873a4d4 to your computer and use it in GitHub Desktop.
Filter files in a directory, list other with similar name but slight pattern change and then remove them
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
# Filter files that contains (1) in their names (copies). Remove this from the name and then use this delete the original files | |
ls *.jpg | cut -d. -f1 | cut -d"(" -f1 | awk '{print $1".JPG"}' | xargs rm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment