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
Post a Comment