Hi,
I'm trying to pipe info from awk to whois. Basically, I want a list of organizations that are accessing my server. When I do this:
$ awk '{print $5}' temp.log
199.71.0.43
$ awk '{print $5 | "wc"}' temp.log
1 1 12
$ awk '{print $5 | "whois"}' temp.log
I just get the whois help. I tried using xargs, but I do not quite understand it even after reading the man.
On a side note, I know that the output of whois is multiline. I'm also trying to figure out how to just get the org name out (trying to use the whois switches, but may just need to pipe to grep).
Thanks.
I'm trying to pipe info from awk to whois. Basically, I want a list of organizations that are accessing my server. When I do this:
$ awk '{print $5}' temp.log
199.71.0.43
$ awk '{print $5 | "wc"}' temp.log
1 1 12
$ awk '{print $5 | "whois"}' temp.log
I just get the whois help. I tried using xargs, but I do not quite understand it even after reading the man.
On a side note, I know that the output of whois is multiline. I'm also trying to figure out how to just get the org name out (trying to use the whois switches, but may just need to pipe to grep).
Thanks.