Last change
on this file since 143 was
137,
checked in by rosiere, 15 years ago
|
Various modif (add test, and vhdl)
|
-
Property svn:executable set to
*
-
Property svn:keywords set to
Id
|
File size:
664 bytes
|
Rev | Line | |
---|
[136] | 1 | prefix=$2; |
---|
| 2 | suffix=$1; |
---|
| 3 | |
---|
| 4 | for i in *; do |
---|
| 5 | |
---|
| 6 | old=$i; |
---|
| 7 | |
---|
| 8 | if test -n "${prefix}"; then |
---|
| 9 | prefix_old=$(echo $old | cut -d${prefix} -f1)${prefix}; |
---|
| 10 | old=$(echo $old | cut -d${prefix} -f2); |
---|
| 11 | fi; |
---|
| 12 | if test -n "${suffix}"; then |
---|
| 13 | suffix_old=${suffix}$(echo $old | cut -d${suffix} -f2); |
---|
| 14 | old=$(echo $old | cut -d${suffix} -f1); |
---|
| 15 | fi; |
---|
| 16 | |
---|
| 17 | x=$(echo $old | cut -d_ -f1 | tr -d x); |
---|
| 18 | w=$(echo $old | cut -d_ -f2 | tr -d w); |
---|
| 19 | n=$(echo $old | cut -d_ -f3); |
---|
| 20 | new=x0${x}_w0${w}_0${n}; |
---|
| 21 | |
---|
| 22 | echo "${i} : ${old} -> ${new}"; |
---|
| 23 | |
---|
| 24 | file_new=${prefix_old}${new}${suffix_old}; |
---|
| 25 | |
---|
| 26 | sed s/${old}/${new}/ ${i} > ${file_new}; |
---|
| 27 | # svn rm ${i}; |
---|
| 28 | done; |
---|
Note: See
TracBrowser
for help on using the repository browser.