Better HN
topnewbestaskshowjobs
Log inSign up

tweakism

7 karma · joined Nov 20, 2011 (15y ago) · 2 submissions

Submissions

comment 9y ago · link · parent

You suggest literally the same solution that the person you were arguing with suggested!

comment 15y ago · link · parent

These are actually two different "rename" commands. bgaluszka's version is usually found on Fedora/RHEL/etc. systems coming from the util-linux package, while your version is usually found on Debian/Ubuntu/etc. systems coming from the Perl package.

I prefer the regex one, of course, especially since it takes proper Perl regexes :)

You have to be careful of this though and probably avoid using this command in shell scripts.

edit: You can just stick Debian's rename at $HOME/bin/rename.pl and call it a day; this command is useful in the terminal since it's less typing than a for loop.