Query in linking

Hey guys,

i have written the folowing grep command to find an ip address from various files and now i have to find the reverse DNS for it.

I wanted to do it via nslookup or host

does someone have any clue about how to do it?

what i tried was

grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' Times.txt || nslookup ip

but it doesnt give any output to me?

i have used piping here...is it not valid?

using || for piping? it should be |

And of course nslookup doesn't read the host names from standard input. Try xargs (or look here).