[kwlug-disc] bash - file renaming

Ronald Barnes ron at ronaldbarnes.ca
Fri Sep 27 03:18:05 EDT 2019


Remi Gauvin wrote on 26/09/2019 07.07:

> But this is not the
> first time I find veterans who are completely unaware of the Linux
> rename command.

Perhaps I was unclear in my initial post.


It's not that I'm unaware of rename (Perl) and rename.ul - those just 
don't meet the requirements of having syntax like the DOS "ren" command, 
which, IMHO, has the most natural syntax of all of them.

And which matches the "mv" and "cp" commands, which seems a rename 
utility ought to do.



> In your example, this would have been done with
> rename.ul .htm .html *.htm
> 
> (Ironically, this is the exact example in the rename.ul man page.)

Yes, I saw that and was reminded *.htm is my most disliked filename 
extension ever, so I used it in my examples too.




More information about the kwlug-disc mailing list