I've been attempting to use the util-linux version of rename (2011) to replace a specific string in all files with another. While I realize the perl version of rename would offer a solution, I can't figure out how to use this version of rename.
The specific example are a set of files (something--2013.mkv, somethingelse--2011.mkv), and I'm trying to remove the double dashes and replace with a space.
rename 's/--/\ \ /' *.mp4
– Mendiola--
means "the end of the options" for programs usinggetopt
(such asrename
). The solution is most likely to find the way around that. Perhaps you could translate-
into something else first (e.g._
) and then replace that? – Doubledecker--
– Doubledeckerrename -- -- - file
– Doubledecker