cdotfis-mac/dotfiles/.local/bin/rename.sh

6 lines
118 B
Bash
Executable File

#!/bin/bash
find "$1" -type f -name "*$2*" | while read FILE; do
mv $FILE "$(echo $FILE | sed "s/$2/$3/g")"
done