help with sh script

fbsd_user fbsd_user at a1poweruser.com
Sun Jul 3 16:14:12 GMT 2005



On 03 jul 2005, at 15:39, fbsd_user wrote:

>> What is the sh coding to strip the periods from a IP address??
>>
>>
>> raw_ip='10.0.10.5'      this is starting
>> num_ip='100105'        and this is what I need to convert to.
>>
>>
>>
>Hi,
>many ways, here's one:
>
>printf '10.0.10.5' | sed 's/\.//g'
>
>Arno

*****************************************

Thanks but I need a little more help.

num_ip="(printf $raw_ip | sed 's/\.//g')"

gives me a error.

What would the correct syntax be?

I am trying to write script to insert rules into PF firewall 
on 5.4. using pf anchors.




More information about the freebsd-questions mailing list