I'm trying to grep the IPs by using this command but I get an error No such file or directory
.
cat sub.txt | xargs dig {} short | grep -Po ([0-9]){2,3}(\\.[0-9]{1,3}){3}
CodePudding user response:
This should do the complete job:
dig -f sub.txt short
See: man dig
CodePudding user response:
I'm just adding " double quotation after the -Po and now it works ^^
grep -Po "([0-9]){2,3}(\.[0-9]{1,3}){3}"