Pull out information from output logs

My scenario is as follows.

  1. I have a reference file with the IP addresses and names
$ cat ref.list
10.11.xxx.xxx    AA
10.12.xxx.xxx    BB
10.13.xxx.xxx    CC
10.14.xxx.xxx    DD
  1. A script runs and gets me one of the IP addresses and puts it in a separate file, for e.g audit_output.log

  2. I now have to check the user associated with the IP address that I get from audit_output.log and print the user.

Can sombody help me on how to go about with this ?

Thanks

What makes you think that any user is associated with an IP address?

I a user is associated with an IP address, what makes you think there is only one user associated with that IP address?

The IP address list I have is going to be a static one. It will not change. That will be used like kind of a master file.