search a file for processes


 
Thread Tools Search this Thread
Top Forums Programming search a file for processes
# 1  
Old 10-13-2011
Question search a file for processes

I have a file with the following content i need to get the Timestamp,Elapsetime, and calculate the averages of the Elapsedtime, foreach process and need to display the process name one by one.i.e for 1st process it has to display all the existence then followed by next process.

Code:
BEGINTRANS
logging.c/LogTransactionInput (3105) : Timestamp <14Sep1111-07-37>  Input <NEWOLUF2!NEWOLUF2<?xml version="1.0" standalone="yes
"?><OLUF2><INPUT><FLT>SK  1467</FLT><LEG>OSLCPH</LEG><DEPDATE>27SEP11</DEPDATE><BUCKET>Y</BUCKET><BUCKETBKGCL>Y</BUCKETBKGCL><B
KGCL>Y</BKGCL><PARMS>Y</PARMS><COMMENTS>Y</COMMENTS><WARNINGS>Y</WARNINGS><OPARAMETERS>Y</OPARAMETERS><LOCALAVAPOS>Y</LOCALAVA
POS></INPUT></OLUF2>>
ElapseTime <745> milliseconds
ENDTRANS
BEGINTRANS
logging.c/LogTransactionInput (3105) : Timestamp <14Sep1111-07-37>  Input <NEWOLUF2!NEWOLUF2<?xml version="1.0" standalone="yes
"?><OLUF2><INPUT><FLT>SK  1455</FLT><LEG>OSLCPH</LEG><DEPDATE>29SEP11</DEPDATE><BUCKET>Y</BUCKET><BUCKETBKGCL>Y</BUCKETBKGCL><B
KGCL>Y</BKGCL><PARMS>Y</PARMS><COMMENTS>Y</COMMENTS><WARNINGS>Y</WARNINGS><OPARAMETERS>Y</OPARAMETERS><LOCALAVAPOS>Y</LOCALAVA
POS></INPUT></OLUF2>>
ElapseTime <765> milliseconds
ENDTRANS
BEGINTRANS
logging.c/LogTransactionInput (3105) : Timestamp <14Sep1111-07-37>  Input <<NAVSREQUEST><FLT>SK 4417  </FLT><LEG>TOSOSL</LEG><DE
PDATE>02SEP12</DEPDATE></NAVSREQUEST>>
ElapseTime <579> milliseconds
ENDTRANS
BEGINTRANS
logging.c/LogTransactionInput (3105) : Timestamp <14Sep1111-07-38>  Input <<NAVSREQUEST><FLT>SK 1467  </FLT><LEG>OSLCPH</LEG><DE
PDATE>27SEP11</DEPDATE></NAVSREQUEST>>
ElapseTime <356> milliseconds
ENDTRANS
BEGINTRANS
logging.c/LogTransactionInput (3105) : Timestamp <14Sep1111-07-38>  Input <<NAVSREQUEST><FLT>SK 1455  </FLT><LEG>OSLCPH</LEG><DE
PDATE>29SEP11</DEPDATE></NAVSREQUEST>>
ElapseTime <390> milliseconds
ENDTRANS
BEGINTRANS
logging.c/LogTransactionInput (3105) : Timestamp <14Sep1111-07-41>  Input <DEPLEGS!1!CMD=0#STAT=0#MAXREC= 8#FLT=SK 1467 #DEPDAT
E=18SEP11>
ElapseTime <286> milliseconds
ENDTRANS
BEGINTRANS
logging.c/LogTransactionInput (3105) : Timestamp <14Sep1111-07-41>  Input <NEWOLUF2!NEWOLUF2<?xml version="1.0" standalone="yes
"?><OLUF2><INPUT><FLT>SK  1467</FLT><LEG>OSLCPH</LEG><DEPDATE>18SEP11</DEPDATE><BUCKET>Y</BUCKET><BUCKETBKGCL>Y</BUCKETBKGCL><B
KGCL>Y</BKGCL><PARMS>Y</PARMS><COMMENTS>Y</COMMENTS><WARNINGS>Y</WARNINGS><OPARAMETERS>Y</OPARAMETERS><LOCALAVAPOS>Y</LOCALAVA
POS></INPUT></OLUF2>>
ElapseTime <651> milliseconds
ENDTRANS
BEGINTRANS
logging.c/LogTransactionInput (3105) : Timestamp <14Sep1111-07-42>  Input <<NAVSREQUEST><FLT>SK 1467  </FLT><LEG>OSLCPH</LEG><DE
PDATE>18SEP11</DEPDATE></NAVSREQUEST>>
ElapseTime <292> milliseconds
ENDTRANS
BEGINTRANS
logging.c/LogTransactionInput (3105) : Timestamp <14Sep1111-07-52>  Input <DEPLEGS!1!CMD=0#STAT=0#MAXREC= 8#FLT=SK 0811 #DEPDAT
E=02SEP12>
ElapseTime <345> milliseconds


Last edited by pludi; 10-13-2011 at 06:33 AM..
# 2  
Old 10-13-2011
This problem was homework the last time you asked it. Post in the homework forum using the homework forum rules. You already got more of an answer from me last time than I ought to have given you.
# 3  
Old 10-14-2011
NO i got the solution for the previous problem i faced, this is to find the total process valuesSmilie
# 4  
Old 10-14-2011
It doesn't matter if it's a different question, as long as it's the same task given as homework. Thread closed.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Checksum different For Same file Created By Two processes

I have one utility in VB which generates attached file(circle.14.mdn_range.properties_VB) & i have created other file(circle.14.mdn_range.properties_UTLFILE) having same contents with UTL_FILE(Oracle running on solaris). But checksum is different for both the files with same contents. Can you... (7 Replies)
Discussion started by: siramitsharma
7 Replies

2. Shell Programming and Scripting

Read in search strings from text file, search for string in second text file and output to CSV

Hi guys, I have a text file named file1.txt that is formatted like this: 001 , ID , 20000 002 , Name , Brandon 003 , Phone_Number , 616-234-1999 004 , SSNumber , 234-23-234 005 , Model , Toyota 007 , Engine ,V8 008 , GPS , OFF and I have file2.txt formatted like this: ... (2 Replies)
Discussion started by: An0mander
2 Replies

3. UNIX for Dummies Questions & Answers

Search file and print everything except multiple search terms

I'm trying to find a way to search a range of similar words in a file. I tried using sed but can't get it right:sed 's/\(ca01\)*//'It only removes "ca01" but leaves the rest of the word. I still want the rest of the information on the lines just not these specific words listed below. Any... (3 Replies)
Discussion started by: seekryts15
3 Replies

4. Shell Programming and Scripting

Retrieving the relevant search from search file in the main file

I have two files: file 1: hello.com neo.com,japan.com,example.com news.net xyz.com, telecom.net, highlands.net, software.com example2.com earth.net, abc.gov.uk file 2: neo.com example.com abc.gov.uk file 2 are the search keys to search in file 1 if any of the search... (7 Replies)
Discussion started by: csim_mohan
7 Replies

5. Shell Programming and Scripting

Nested search in a file and replace the inner search

Hi Team, I am new to unix, please help me in this. I have a file named properties. The content of the file is : ##Mobile props east.url=https://qa.east.corp.com/prop/end west.url=https://qa.west.corp.com/prop/end south.url=https://qa.south.corp.com/prop/end... (2 Replies)
Discussion started by: tolearn
2 Replies

6. Shell Programming and Scripting

A script that processes a sample of a file

hi all, I need some help in regards of how to process just a sample from a large .txt file I have a large file from many new lines (say above 200.000 new lines), I need a script that process just a sample of it, say 10.000 bur a random sample (taking rows from top top to the the bottom) ... (4 Replies)
Discussion started by: c_lady
4 Replies

7. Shell Programming and Scripting

Perl - use search keywords from array and search a file and print 3rd field when matched

Hi , I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code. my $current_value=12345; my @users=("bob","ben","tom","harry"); open DBLIST,"<","/var/tmp/DBinfo"; my @input = <DBLIST>; foreach (@users) { my... (11 Replies)
Discussion started by: chidori
11 Replies

8. Shell Programming and Scripting

sed help - search/copy from one file and search/paste to another

I am a newbie and would like some help with the following - Trying to search fileA for a string similar to - AS11000022010 30.4 31.7 43.7 53.8 60.5 71.1 75.2 74.7 66.9 56.6 42.7 32.5 53.3 I then want to replace that string with a string from fileB - ... (5 Replies)
Discussion started by: ncwxpanther
5 Replies

9. Solaris

Identifying and grouping OS processes and APP processes

Hi Is there an easy way to identify and group currently running processes into OS processes and APP processes. Not all applications are installed as packages. Any free tools or scripts to do this? Many thanks. (2 Replies)
Discussion started by: wilsonee
2 Replies

10. UNIX for Advanced & Expert Users

Monitoring Processes - Killing hung processes

Is there a way to monitor certain processes and if they hang too long to kill them, but certain scripts which are expected to take a long time to let them go? Thank you Richard (4 Replies)
Discussion started by: ukndoit
4 Replies
Login or Register to Ask a Question