using awk sed to parse update puppet file
问题 I have a puppet file with a number of lines of code that has a section that looks like this: $defaultrepo=myrepo $defaultbranch=mybranch gitmod::pullstuff {'othergitcode': gitcommit => "b54123be540adrwer3b65872384e0101c5f94c926b81", gitorg => "${defaultrepo}", branch => "${defaultbranch}", } gitmod::pullstuff {'mygitcode': gitcommit => "b54123be540adrfer3b65872384e0101c5f94c926b81", gitorg => 'awesomerepo', branch => "master", } It can have any number of blocks that will look similar to the