Created
February 9, 2023 15:19
-
-
Save moofkit/dfe70285de51df4aba81ed8d758ca55b to your computer and use it in GitHub Desktop.
Rename files with patterns in bash
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
$find . -depth -name "*old.txt" -exec sh -c 'f="{}"; mv -- "$f" "${f%old.txt}new.csv"' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment