First release of mmv for over 30 years
github.com
github.com
I picked up mmv because, having used it for years myself, I noticed that it deliberately refused to rename directories. There seemed to be no technical reason it could not do this, so I lifted the restriction.
I then took the opportunity to unifdef the code, ANSIfy it, add a modern command-line parser with gengetopt, use autotools and gnulib to make it more portable (including to Windows for the first time—the original version ran on DOS!), and remove custom code (including a memory allocator!) that is unnecessary on modern systems.
I also removed the fragile support for interactive renaming, which didn't cope with various odd filenames; this functionality is already well-served by renameutils, and a more recent program also called mmv.
The result is 60% the length of the original, most of the savings being from removing the DOS port. With a bit of luck, good for another 30 years!
Thank you for the input!
> mmv - move/copy/append/link multiple files by wildcard patterns
> Rename files ending in .html.en, .html.de, etc. to ending in .en.html, .de.html, etc. in the current directory:
> mmv '*.html.??' '#1.#2#3.html'
[0]: https://github.com/rrthomas/mmv/blob/master/mmv-include.man
PS: back in the day, I'd read somewhere that the Linux equivalent of DOS's REN was "mv". So then I tried:
mv *.CPP *.ccI wasn't exactly wrong!
<pedantic>
Is this a license violation or did Reuben Thomas get Vladimir Lanin's permission? The mmv license is rather strict:Mmv is freeware. That means that the entire package of software and documentation is copyrighted, and may not be distributed with any modifications or for any charge (without the author's explicit written permission). Other than that, it may be used and distributed freely.