Possible Duplicate:
How can I rename a lot of files using a regex?
I've got some files named
abc-10.5.3.1-1.x86_64.rpm
abc-compiler-10.5.3.1-1.x86_64.rpm
abc-10.5.3.1-6.x86_64.rpm
abc-compiler-10.5.3.1-6.x86_64.rpm
I'd like to remove the minor version numbers (1-1 and 1-6) whenver the files are built. I can't figure out how to achieve this with the rename command on Redhat linux. The resulting filename should for example be:
abc-10.5.3.x86_64.rpm
The command doesn't take regular expressions.
.<arch>
specifier) can have significance in some cases, but removing part of version number is usually not really a good idea - the version number is there for some reason. :) – peterph Nov 27 '12 at 17:36abc
andabc-compiler
packages. Which on install might be caught byrpm
, but on extra cost. – peterph Nov 27 '12 at 18:23