



If you want to avoid installing anything, or need to select by number range avoiding matches outside this range, and you are prepared to wait for 74,023 command invocations, you could use a plain bash loop: for i in on each result of the glob. If you have files outside the requested number range in the same directory, you might be better off with the loop over numbers given further down in this answer. Of course you are free to be more specific: mmv 'sb_606_HBO_DPM_*' 'sb_606_dpm_#1' Also note that the command above assumes that all the files which match the first glob shall be renamed. The command receives exactly two arguments, and then finds corresponding files internally, without tight limits on the number of files. Note that the arguments are passed as strings, so the glob expansion does not happen in the shell. mmvįrom the package of the same name: mmv '*HBO_DPM*' '#1dpm#2' Each is a simple single line command, but I'll provide variants for more complicated cases, mainly in case the files to process are mixed with other files in the same directrory.
