shell script question

Barry Roberts blr at robertsr.us
Wed Oct 12 19:23:33 MDT 2005


On Wed, Oct 12, 2005 at 06:33:10PM -0600, Richard K. Miller wrote:
> ifconfig | grep netmask | grep -v 127.0.0.1 | awk {'print $2'} | sed  
> 's/10.1.1.//'
> 
> curl -u admin:password -d  
> "submit_button=DMZ&change_action=&action=Apply&dmz_enable=1&dmz_ipaddr=5 
> " -s http://10.1.1.1/apply.cgi
> 
> How do I connect the two commands?
> 

dmz_ipaddr=$(ifconfig | grep netmask | grep -v 127.0.0.1 | awk {'print $2'} | sed 's/10.1.1.//')
curl -u admin:password -d "submit_button=DMZ&change_action=&action=Apply&dmz_enable=1&dmz_ipaddr=${dmz_ipaddr} " -s http://10.1.1.1/apply.cgi



More information about the PLUG mailing list