I am learning how to use the command-line Unix utility
rename (see, for example, https://www.tecmint.com/rename-multiple-files-in-linux/).
The manual for
rename says that you can combine multiple renaming rules (notice, it is a synopsys of the usage where I remove other arguments for clarity):
rename [ -e|-E perlexpr]*|perlexpr [ files ]
I try to do this on the following ariticial example. I have a directory with files:
$ ls 01.php 02.php 03.php
I apply two transformations using one
rename -n -v -e "s/\.php$/\.htm/" "y/a-z/A-Z/" *
The expected behavior is that I will have:
$ ls 01.HTM 02.HTM 03.HTM
However, the output of
rename(01.php, 01.htm) rename(02.php, 02.htm) rename(03.php, 03.htm)
that is, the second transformation (lowercase to uppercase characters) is not applied.
How to combine multiple expressions together?