You're replying to a comment by mug896.

mug896 Permalink
December 30, 2013, 01:30

how about this one for IPv4 check

awk -F '[.]' 'function ok(n) {
if (n ~ /^[0-9][0-9]?[0-9]?$/) {
return (n>=0 && n<=255)
}
}
{exit (ok($1) && ok($2) && ok($3) && ok($4))}'

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the first letter of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.