title: Jenkins update builder shell command using groovy
body: <p>I need to update 'execute shell' command of Build section in Series of Jenkins Jobs. And i am using groovy for it.
  Here is starting script. Although it does not seems to update.</p>
  
  <pre><code>import hudson.model.*
  
  for(item in Hudson.instance.items) {
      if (item.name == 'TEMP-RELEASE-UPDATE') {
          println("--- Parameters for :" + item.name)
          def branches = item.scm.getBranches()
          for (builder in item.buildersList) {
              new_command =  builder.command.replaceAll('PATTERN_1','PATTERN_2')
              builder.command = new_command
              builder.save()
          }
      }
  }
  </code></pre>
  
  <p>It normally breaks at 'builder.command = new_command'.
  Can someone help to modify this script and save resultant to 'execute shell' block successfully?</p>
  
  <p>Thanks</p>