title: Search for numbers in files and replace the match with "result -1"
body: <p>I want to subtract 1 from every number before the character '=' in a list of files. For example, rename a string in a file such as "sometext.10.moretext" to "sometext.9.moretext". </p>
  
  <p>I thought this might work:</p>
  
  <pre><code>grep -rl "[0-9]*" ./TEST | xargs sed -i "s/[0-9]*/&amp;-1/g"
  </code></pre>
  
  <p>But it merely adds "-1" as a string after my numbers, so that the result is "sometext.10-1.moretext". I'm not really experienced with bash (and using it via windows), is there a way to do this? Powershell would also be an option.  </p>
  
  <p><em>edit</em> </p>
  
  <p><strong>Input</strong>: some.text.10.text=some.other.text.10</p>
  
  <p><strong>Desired Output</strong>: some.text.9.text=some.other.text.10</p>
  
  <p><strong>Note</strong>: The actual number can be something from 1 to 9999.</p>
  
  <p><strong>File names have the following pattern</strong>: text@name#othername.config</p>