Created
May 3, 2015 23:22
-
-
Save arundurvasula/54467b738b7e62dd1820 to your computer and use it in GitHub Desktop.
add regions to config files
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 | |
# this script will add "REGIONS="${REGION}:" to a base regions file and save it as [basename].conf.${REGION} | |
set -u | |
INCONF=$1 | |
START=1 | |
END=12 | |
for ((i=START; i<=END; i++)) | |
do | |
cp $INCONF $INCONF.$i | |
echo "REGIONS=\"$i:\"" >> $INCONF.$i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment