basedir=$(cd "$(dirname "$0")";pwd) cd $basedir markets="dev androiMarket gfan anzhi" for market in $markets do echo packaging wardrobe_1.1.1_$market.apk ... sed -i '' "s/\(android:value=\)\"\(.* \)\"\( android:name=\"UMENG_CHANNEL\"\)/\1\"$market
#!/bin/bash basedir=$(cd "$(dirname "$0")";pwd) cd $basedir markets="dev androiMarket gfan anzhi" for market in $markets do echo packaging wardrobe_1.1.1_$market.apk ... sed -i '' "s/\(android:value=\)\"\(.*\)\"\( android:name=\"UMENG_CHANNEL\"\)/\1