#!/bin/bash s="[IP] 192.168.1.0"ip="192.168.15.24"sed "s/^\[IP] .*/[IP] $ip/" <<< "$s"
Standard input is empty
[IP] 192.168.15.24
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!