Hi all,
I have regular files renamed by a program which i can't alter the output of to correct my issue.
The output adds brackets "()" around the date it adds which i want to remove.
Now i'm currently using the following to remove them myself but when it comes across a file with 2 sets of brackets in the name it removes all the text between the first and second set of brackets.
Code:
for file in $to_watch/*; do mv "$file" "${file/ (*)/}"; done
so when this runs on a filename with a two sets of brackets it removes the text like the following example.
FROM: filename (2010) something (2).ext
TO: filename.ext
any ideas how i can get it to remove the two sets of brackets and keep the text between the two?