title: How to check if the first character of a string is number in bash?
body: <p>I am writing an xml element in bash. I need to replace some strings which will start with numbers into something that starts with an character, so it is a valid XML tag (remember xml tags cannot start with alpha numeric characters). </p>
  
  <p>For Example,</p>
  
  <pre><code>  str = 192.16.76.52,1001
  </code></pre>
  
  <p>which is not a valid xml tag, i.e i cannot do </p>
  
  <pre><code>&lt;192.16.76.52,1001&gt;
  .....
  &lt;/192.16.76.52,1001&gt;
  </code></pre>
  
  <p>So, I am planning to detect if it is a number and replace it with something like</p>
  
  <pre><code>IP192.16.76.52
  </code></pre>
  
  <p>I know I can do it with IFS, but it might take long time and extra code.</p>
  
  <p>Since you know the main problem, feel free to comment or offer suggestions.</p>
  
  <p>Thanks</p>