title: Replace numbers not in parentheses?
body: <p>I have a file containing some numbers and letters, e.g.:</p>
  
  <p>Input:</p>
  
  <pre><code>9(9)S99
  D9(9)L9(9)
  G999N9(9)
  99C99
  </code></pre>
  
  <p>I need to replace all numbers(in this case 9) by <strong>X</strong> except those inside parentheses, e.g.:</p>
  
  <p>Output:</p>
  
  <pre><code>X(9)SXX
  DX(9)LX(9)
  GXXXNX(9)
  XXCXX
  </code></pre>
  
  <p>Is that posible in bash using sed, grep or awk?<br>
  Thanks in advance for your help.</p>