Created
November 7, 2012 15:08
-
-
Save mdyn/4032141 to your computer and use it in GitHub Desktop.
Replace old to new
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
#!/bin/bash | |
DIRW=$1 | |
echo "path $DIRW" | |
find $DIRW -type f -exec sed -i 's/<departDate>/<startDate>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<arriveDate>/<endDate>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<departTime>/<startTime>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<arriveTime>/<endTime>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<departAirport>/<startCode>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<arriveAirport>/<endCode>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<departCity>/<startCity>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<arriveCity>/<endCity>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<companyFull>/<companyName>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<companyShort>/<companyCode>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<codeName>/<confirmationName>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<departStation>/<startCity>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<arriveStation>/<endCity>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<name>/<companyName>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<phone>/<companyPhone>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<address>/<companyAddress>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<checkInDate>/<startDate>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<checkOutDate>/<endDate>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<checkInTime>/<startTime>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<checkOutTime>/<endTime>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<nights>/<days>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<pickupAddress>/<startAddress>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<returnAddress>/<endAddress>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<pickupDate>/<startDate>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<returnDate>/<endDate>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<pickupTime>/<startTime>/g' {} \; | |
find $DIRW -type f -exec sed -i 's/<returnTime>/<endTime>/g' {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment