Created
September 22, 2022 10:18
-
-
Save NeoHBz/5194db4ab36f1fce31a3a6c874653afd to your computer and use it in GitHub Desktop.
batch rename files with regex pattern
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install rename | |
# remove `-n` for the script to actually work | |
rename -n 's/^\[https.*\]_(.*)/${1}/' * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment