Created
January 19, 2017 20:50
-
-
Save darshilv/443484f495369251c0b10ef8386c8182 to your computer and use it in GitHub Desktop.
find files in current directory and subsequent directories within it and rename them
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
for f in `find . -type f -name "Enagement*" -prune -o -depth +1 -print | grep -e "/Engagement*"` | |
do | |
filepath=`echo $f | awk -F "/" '{print $2}'` | |
filename=`echo $f | awk -F "/" '{print $3}'` | |
newName="./$filepath/""Sko$filename" | |
mv $f $newName | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment