For example I have a file named 5.jpg
. How can I rename it to aaaaa.jpg
with char a
5 times.
I tried rename -v 's/(\d{1,})/a{$1}/g' *
but this renames 5.jpg
to a{5}.jpg
, which is not what I want. I understand that second part of function isn't a regexp, this was just an attempt.
rename(1)
fromUnicode::Tussle
, and somebody complained some options were not recognized on his version. As it turned out he was using a differentrename(1)
(an older script munged by the Debian guys, I think). Amazingly, none of the authors thought thatrename
is actually a really common name and that it would be wise to call it something else instead. – lcd047 Jun 17 '15 at 14:57