Check IPv4 dotted-quad syntax and octet ranges.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_validate_ipv4

Purpose

Check IPv4 dotted-quad syntax and octet ranges.

Arguments

  • $1 — Candidate IPv4 address.

Returns

  • 0 for exactly four decimal octets between 0 and 255; 1 otherwise.

Usage

  sgnd_validate_ipv4 "192.168.0.10"