-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathrenameScript.sh
More file actions
22 lines (18 loc) · 807 Bytes
/
renameScript.sh
File metadata and controls
22 lines (18 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# script for renaming object files, and replacing their references
# in transitions
# replace "-n" with "" to execute (-n makes dry run for rename)
flag="-n"
rename $flag 's/7120/3961/' $(find objects transitions -name "*7120*")
echo
rename $flag 's/7121/3962/' $(find objects transitions -name "*7121*")
echo
rename $flag 's/7122/3963/' $(find objects transitions -name "*7122*")
echo
rename $flag 's/7123/3964/' $(find objects transitions -name "*7123*")
echo
rename $flag 's/7124/3965/' $(find objects transitions -name "*7124*")
sed -i "s/7120/3961/" objects/*.txt transitions/*.txt
sed -i "s/7121/3962/" objects/*.txt transitions/*.txt
sed -i "s/7122/3963/" objects/*.txt transitions/*.txt
sed -i "s/7123/3964/" objects/*.txt transitions/*.txt
sed -i "s/7124/3965/" objects/*.txt transitions/*.txt