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).
For Example,
str = 192.16.76.52,1001
which is not a valid xml tag, i.e i cannot do
<192.16.76.52,1001>
.....
</192.16.76.52,1001>
So, I am planning to detect if it is a number and replace it with something like
IP192.16.76.52
I know I can do it with IFS, but it might take long time and extra code.
Since you know the main problem, feel free to comment or offer suggestions.
Thanks
The RHS of
=in[[takes a glob pattern.