H
Hike Mike
I want to use perl to add 2 lines of code to every .conf file in all
subdirectories of a given path:
D:\projects\edge\workspace>echo find -path "*"config"*".conf | xargs
perl -pi.ba
k -e
"s/^DB_CONNECT=true/JMX_HTTP_ADDR=127.0.0.1\nJMX_HTTP_PORT=8090\n\nDB_CONNE
CT=true/"
The problem is that the JMX_HTTP_PORT will be the same in all config
files. It would save me a lot of time if I could increment the port
number after every substitution...something tells me it's time to
script this.
subdirectories of a given path:
D:\projects\edge\workspace>echo find -path "*"config"*".conf | xargs
perl -pi.ba
k -e
"s/^DB_CONNECT=true/JMX_HTTP_ADDR=127.0.0.1\nJMX_HTTP_PORT=8090\n\nDB_CONNE
CT=true/"
The problem is that the JMX_HTTP_PORT will be the same in all config
files. It would save me a lot of time if I could increment the port
number after every substitution...something tells me it's time to
script this.