Skip to content

Instantly share code, notes, and snippets.

@GoBigorGoHome
Last active May 10, 2024 01:04
Show Gist options
  • Save GoBigorGoHome/182f66771b8d4830e46eb1a632a7919f to your computer and use it in GitHub Desktop.
Save GoBigorGoHome/182f66771b8d4830e46eb1a632a7919f to your computer and use it in GitHub Desktop.
使用 perl-rename 批量重命名文件

例一

policija.in.1  ->  policija1.in
policija.out.1 ->  policija1.out
perl-rename 's/policija\.($\\w+)\.($\\d+)/policija$2.$1/' *

或者

perl-rename 's/\.($\\w+)\.($\\d+)/$2.$1/' *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment