#!/bin/bash awk '{ if($0 ~ /192\.168\.[0-9]+\.[0-9]+/){print "yes"}else if($0 ~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/){print "no"}else{print "error"} }' "./nowcoder.txt"