awk '{
if($0~/^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{0,2})\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{0,2})$/)
print "yes"
else if($0~/^([0-9]*\.){3}[0-9]*$/)
print "no"
else
print "error"
}' nowcoder.txt
awk '{
if($0~/^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{0,2})\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{0,2})$/)
print "yes"
else if($0~/^([0-9]*\.){3}[0-9]*$/)
print "no"
else
print "error"
}' nowcoder.txt