I looking to take the last group number in a ip address and bump the number by 1.
BY the way is there some name for each group of numbers in the ip address?

Something like.

org_ip="10.0.10.2"
short_ip=need command to strip off the 2 so short_ip contains 10.0.10.
and ip_suffix= ends up holding the 2, then add 1 to the ip_suffix.
ip_suffix=$(( ${ip_suffix + 1 ))
org_ip="${short_ip}${ip_suffix}"

Thinking there must be some common way of manipulating ip addresses that I just don't know about.

Thanks for your help.

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to