Pull out information from output logs


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Pull out information from output logs
# 1  
Old 07-07-2014
Pull out information from output logs

My scenario is as follows.

1. I have a reference file with the IP addresses and names
Code:
$ cat ref.list
10.11.xxx.xxx    AA
10.12.xxx.xxx    BB
10.13.xxx.xxx    CC
10.14.xxx.xxx    DD

2. A script runs and gets me one of the IP addresses and puts it in a separate file, for e.g audit_output.log

3. 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

Last edited by Don Cragun; 07-07-2014 at 01:22 AM.. Reason: Add CODE tags.
# 2  
Old 07-07-2014
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?
# 3  
Old 07-07-2014
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get specific information from output

Hello community, I'm going crazy to analize an output via shell script and then get some information from it, here is the output: Slot 2 - MMU2 H, RAU2 X 15/A01 XPIC Enabled Autorestore Unknown Slot 3 - MMU2 H, RAU2 X 15/A01 XPIC ... (7 Replies)
Discussion started by: Lord Spectre
7 Replies

2. Shell Programming and Scripting

[Solved] How can I pull specific information from PS?

I need to grab information from the output of the ps command. For each line of ps output that contains _progres -b I need to get the word that follows -p. The "-p" can be anywhere after "_progres -b". Using grep to select the correct lines is no problem (e.g. ps -ef|grep "_progres \-b|grep -v... (3 Replies)
Discussion started by: Papa Lee
3 Replies

3. Shell Programming and Scripting

Expect doesn't output the logs

(qemu) migrate -d tcp:192.168.122.1:4444 (qemu) info migrate capabilities: xbzrle: off Migration status: completed total time: 4425 milliseconds downtime: 3 milliseconds transferred ram: 130338 kbytes remaining ram: 0 kbytes total ram: 1057152 kbytes duplicate: 232613 pages normal:... (0 Replies)
Discussion started by: yanglei_fage
0 Replies

4. Shell Programming and Scripting

Take the input from output logs

Hi, If I have loads of logs like below and I am interested to print the requests(lines) which have taken more than 1000 ms. In this case how could I print the two highlighted lines ? abc.log reqquest id232342 , adfghfasdfsaf, TIME=30 reqquest id11111 , asdfdfghdffsaf, TIME=54 reqquest... (4 Replies)
Discussion started by: nariwithu
4 Replies

5. Shell Programming and Scripting

Take the input from output logs

Hi, If I have loads of logs like below and I am interested to print the requests(lines) which have taken more than 1000 ms. In this case how could I print the two highlighted lines ? abc.log reqquest id232342 , adfghfasdfsaf, TIME=30 reqquest id11111 , asdfdfghdffsaf, TIME=54 reqquest... (0 Replies)
Discussion started by: nariwithu
0 Replies

6. Shell Programming and Scripting

Output from Logs

Hello All, I have created a script to capture logs on every day at every 3 Min.Please find in attach.So my goal is to mail all the logs to myself for pertical date.So can anyone guide me how can i this on the basis of the attached logs. Regards Ankit (0 Replies)
Discussion started by: ajaincv
0 Replies

7. UNIX for Advanced & Expert Users

using txr to extract information from output

am using txr command (txr 1097) on a process that generates the following output. Im trying to extract the 13th field from the highlighted string. it is delimited by '?'. The 13th field corresponds to the '0' (in bold). can you let me know how I can extract the 13 th field please? ... (1 Reply)
Discussion started by: pazman
1 Replies

8. Shell Programming and Scripting

cant get perl to pull information right

Hello, I cant get the perl script to pull the information from Sark DNS 4.X Options ACL Templates= and other= Can someone look at the script to see why and fix it please. FYI..Under Sark DNS 4.x ACL Templates= and other= has an indent/tab, not sure if thats the reason my the script... (24 Replies)
Discussion started by: richsark
24 Replies

9. UNIX for Dummies Questions & Answers

Logs: getting information from them?

I have some log files and would like to 'strip' some information from them. I would like to take the time: time="Mon Oct 20 01:36:21 BST 2008" and another line that occurs under each time stamp. Does anyone know how I could do this? Many thanks. (5 Replies)
Discussion started by: Sepia
5 Replies

10. UNIX for Dummies Questions & Answers

pull xml's from logs

Hi Frnds I Want to pull xml's from logs based on the below condition.In each log having so many xml's it's taking so much of time to search all logs manually...can u please provide solution USER:ECMINT CONV:GETARPLNICHUBTST <CardNbr>376703134104004</CardNbr> </Envelope> Response XML:... (3 Replies)
Discussion started by: pb18798
3 Replies
Login or Register to Ask a Question