My folders look like this:
$ ls
total 20K
drwxr-xr-x 2 ychaouche ychaouche 4.0K Mar 4 2020 cdc-firewall-v1
drwxr-xr-x 2 ychaouche ychaouche 4.0K Mar 4 2020 cdc-firewall-v2
drwxr-xr-x 2 ychaouche ychaouche 4.0K Nov 24 10:40 cdc-firewall-v3
drwxr-xr-x 2 ychaouche ychaouche 4.0K Nov 24 10:43 cdc-firewall-v4
drwxr-xr-x 2 ychaouche ychaouche 4.0K Nov 24 11:17 X
I want them to look like this : 1, 2, 3, 4 (get rid of cdc-firewall-v
)
Here's what I tried:
$ mmv "*v*" "#2"
*v* -> #2 : no match.
Nothing done.
My reasoning was:
For the
from
part*
would match cdc-firewall- and be assigned to #1v
would matchv
*
would match the last number (1
,2
,3
,4
) and be assigned to#2
For the
to
part: replace the whole name with#2
which would be the number.