Tag Archives: find

One – liner to batch rename files with regex-remove part of the filename

Don’t read this post. It’s only for me so that I don’t forget it 😉 After a long fight with bash, find, sed, … Here is the one – liner: for i in $(find -E . -regex ‘(.*[a-zA-Z]{3}[0-9]{3}[a-zA-Z]{3}_[0-9]{9})(\.[0-9])(\.[jJ][pP]([eE])*[gG])’) ; do … Continue reading

Posted in bash, Coding | Tagged , , , , | Leave a comment