I am a newbie in shell scripting, I have a xml file with following content
<node>
<name>test01</name>
</node>
I want to have these nodes to occur 2000 times i.e
<node>
<name>test0001</name>
</node>
<node>
<name>test0002</name>
</node>
...........
<node>
<name>test2000</name>
</node>
How can I achieve this, anybody got a script readily available. I can run it in unix, windows doesnt matter.
Any help or any pointers in right direction is appreciated.
Thanks in advance.
juju
#!/bin/bash
a=1
while ["$a" -le 5]; do
sed -i 's/test01/test"$a"/' /home/jsheriff/Downloads/Temp/jaldijaldi
cat /Temp/jaldijaldi >> /Temp/newfile
let a=a+1
done
When I run I see this error
/Temp$ . ./testloop.sh
[1: command not found