bash - sed vs line with spaces -


have such file execute

exec java -dcom.sun.management.jmxremote=true \           -dcom.sun.management.jmxremote.port=12345 \           -djava.rmi.server.hostname=127.0.0.1 \           -dcom.sun.management.jmxremote.authenticate=false \           -jar somefile.jar 

the question how change ip using of sed?

for in-place change

sed -i 's/127\.0\.0\.1'/new_ip/' file 

for copy, can use

sed -i 's/127\.0\.0\.1'/new_ip/' file > new_file 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -