Skip to content

Instantly share code, notes, and snippets.

@bradfordpythian
Created March 15, 2017 21:00
Show Gist options
  • Save bradfordpythian/c3c78baa167645679482ab26ed8c806f to your computer and use it in GitHub Desktop.
Save bradfordpythian/c3c78baa167645679482ab26ed8c806f to your computer and use it in GitHub Desktop.
Generate CHANGE MASTER from master.info
BEGIN {
print "CHANGE MASTER TO"
}
{
if (NR==4) {
print " MASTER_HOST='"$0"',"
}
if (NR==5) {
print " MASTER_USER='"$0"',"
}
if (NR==6) {
print " MASTER_PASSWORD='"$0"'"
}
}
END{
print ";"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment