Want to change everything after security.server.ip=* with the result ip from the second grep.
First Grep:
cat admin.conf|grep security.server.ip|grep -v ^#
Result:
security.server.ip=10.10.1.2
Second Grep:
cat /etc/hosts|grep -i admin-server|head -1|awk '{ print $1}
Result:
10.10.1.2
Sometimes security.server.ip will be different on admin.conf and I'm wondering how to replace it with one command which will catch IP address form second grep and replace it in the first one.