0
I need to rename some files .srt, but if I do it in the current way it will impact the old files.
I have several subtitle files that I’ve already edited for pt-BR.srt, but with the addition of new files, if I use my script, it will rename the old ones, playing one more pt-BR in front and thus getting duplicated.
What I need is for the script to identify the file .srt pure, and renamed to pt-BR.srt without renaming the ancient.
Below follows the script I use.
for f in $(find . -name "*.srt"); do mv "$f" "$(echo $f | sed 's/\.srt/.pt-BR.srt/;')"; done
swap the
mvforcp– Alessandro Schneider