Beware there are two incompatible rename programs in the wild. :(
What you have installed, and what Debian and its derivates ship is this: https://metacpan.org/pod/distribution/File-Rename/rename.PL
Most(?) other distros ship the one from util-linux: http://man7.org/linux/man-pages/man1/rename.1.html
Re:New(ish) command line tools
by ChrisGranger on Wednesday April 13, 2022 @10:22AM
(#31014980)
We had the same idea at the same time. For a command line newbie trying to follow a tutorial, it can certainly be confusing.
A newer tool 'brename' is similar but uses standard inputs and allows for full regex. Like rename it has dry mode for safe renaming.
Re:New(ish) command line tools
by ChrisGranger on Wednesday April 13, 2022 @10:20AM
(#31014957)
Note that the rename tool bundled with some distributions is not the Perl version. If someone is looking to install it, it may also be called perl-rename.
If your problem can be solved by just regexps, there's a "rename" tool installed by Perl I've used for decades. E.g.
Will apply the substitution for JPEG at end of the filename to just jpg. The -n will run without renaming so you can see what it intends to do.