我将如何递归重命名
Bluebellgray 19707 Rug P1.jpg
Bluebellgray Amal 1972407 Rug R1.jpg
Bluebellgray Random 1907 Rug R2.jpg
Words Amal 1707 Rug R3.jpg
Whatever 9707 Rug R4.jpg
Run Code Online (Sandbox Code Playgroud)
到
P1.jpg
R1.jpg
R2.jpg
R3.jpg
R4.jpg
Run Code Online (Sandbox Code Playgroud)
我只对最后 6 个字符感兴趣。
我假设答案以rename -n然后一些时髦的正则表达式开始?为了让它递归,我需要管道和重命名吗?我也只对 .jpg 文件感兴趣。
谢谢