Monday, May 15, 2017

Modify port number in .xml configuration file

1234

[root@sandbox jetty]# cat a.sh
#!/bin/bash
port=$1

sed -i 's/[0-9]\+<\/Set>/'"${port}"'<\/Set>/g' jetty.xml


Example:
[root@sandbox jetty]# ./a.sh 5678

No comments: