Skip to content

Instantly share code, notes, and snippets.

@tatic0
Created September 9, 2018 20:14
Show Gist options
  • Save tatic0/459a57ad799f039882e920c42e5e08a8 to your computer and use it in GitHub Desktop.
Save tatic0/459a57ad799f039882e920c42e5e08a8 to your computer and use it in GitHub Desktop.
nice one liners to compare/delete files with the same name but different extension in bash
for i in $(ls *.mov); do echo "$i --> `ls ${i%.*}.MP4`"; done
for i in $(ls *.mov); do echo "$i --> `rm -vf ${i%.*}.MP4`"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment