Skip to content

Instantly share code, notes, and snippets.

@arundurvasula
Created May 3, 2015 23:22
Show Gist options
  • Save arundurvasula/54467b738b7e62dd1820 to your computer and use it in GitHub Desktop.
Save arundurvasula/54467b738b7e62dd1820 to your computer and use it in GitHub Desktop.
add regions to config files
#!/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