Thank you druuna & pixellany for reply.
drunna both of your solutions are not working
I ended up with my own crude hack here. However it's not replacing the 1st serverPort value.
this is the crude simple hack I came up with:
Code:
# Read SERVER_PORT value from file
server_port_val=`grep -i SERVER_PORT /etc/conf.env`
# Get value of paramter SERVER_PORT
server_port_val=`echo $server_port_val | cut -d "=" -f 2`
server_port_val=`echo $server_port_val | cut -d " " -f 1`
# Apply the new Server_Port Value to HTML file
sed -e 's|="9000"|="'$server_port_val'"|' static_jinit.html > 1.html
mv 1.html static_jinit.html
sed -e 's|="9000"|="'$server_port_val'"|' static_jinit.html > 1.html
Now, when I execute this script this is what I get in "1.html"
Code:
...
...
<PARAM NAME="serverArgs" VALUE="module=/xxx/xxxx/xxxx/xxxxx useSDI=yes" >
<PARAM NAME="serverPort" VALUE="7899" >
<PARAM NAME="splashScreen" VALUE="/forms/xxxxx" >
...
...
...
serverArgs ="module=/xxx/xxx/xxx/xxxxx useSDI=yes"
serverPort ="7777"
splashScreen ="/xxxx/xxxxx"
As you can see the 2nd serverPort is changed correctly to 7777. Not the first one???
Thanks