how to change dhcp-range using shell scirpt via Variable
<p>Dear All,</p>
<p>I have small query for Linux Shell Scripting , below is my requirement:</p>
<p>I have configured dnsmasq.conf , and it is working fine , I want to create script which automatically change the configuration of sever based on small input from user:</p>
<p>dhcp-range=192.168.4.200,192.168.4.230,2h </p>
<p>From this line I want to change start range and end range by script,This IP will not be fix all the time so I can not use "192.168.4.200" in my script with sed , I want to put 192.168.4.200 (or any IP there on dhcp-range line with variable $startip) and 192.168.4.230 with (variable $endip) </p>
<p>I tried using grep -o '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' and also tried with awk but till now no success.</p>