Given that i have folder that contain 170+ files that were named like 'SM-RVT70UQTNWC02.png'$'\r'
how can I fast change this to SM-RVT70UQTNWC02.png
? I have tried to apply solution from this question however i'm struggling how to make my regex '*(.*)'\$'\\r'
work with rename
as I get many errors like:
Scalar found where operator expected at (eval 8) line 1, near "*)$\"
(Missing operator before $\?)
Backslash found where operator expected at (eval 8) line 1, near "$\\"
(Missing operator before \?)
syntax error at (user-supplied code), near "*)$\"
$
first$'s/(.*)\r$/$1/'
the second is just for matching line end – Dec 16 '20 at 07:34rename
in combination with find:find . -type f -print0 | rename -0 -d $'s/(.*)\r$/$1/'
– Dec 16 '20 at 07:46