On 2005-07-03 09:39, fbsd_user <[EMAIL PROTECTED]> 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.

There are many ways:

echo "${raw_ip}" | sed -e 's/\.//g'
echo "${raw_ip}" | perl -pe 's/\.//g'
echo "${raw_ip}" | awk -F. '{gsub("\\.", ""); print}'

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to