Sponsored Content
Full Discussion: Parse snoop output
Top Forums Shell Programming and Scripting Parse snoop output Post 302430075 by robdcb on Wednesday 16th of June 2010 01:08:12 PM
Old 06-16-2010
Almost like this, but when I tried to run your script,the lines are not separeted, as you can see on the example above.

I need to have the output separeted by lines. Is it possible ?

Thanks so much !

Code:
LH-MIRT -> 10.31.204.32 TCP D=50520 S=50310 Push Ack=4059676919 Seq=3849670225 Len=202 Win=49232 Options=<nop,nop,tstamp 1195815396
 3278302158>....GF...f..HTTP/1.1 200 OK..Expires: Thu, 01 Jan 1970 00:00:00 GMT..Set-Cookie:JSESSIONID=pokklc1vhe40;Path=/axis..Cont
ent-Type: text/xml; charset=utf-8..Transfer-Encoding: chunked..Server: Jetty(6.1.18)....25D..LH-MIRT -> 10.31.204.32 TCP D=50520 S=
50310 Push Ack=4059676919 Seq=3849670427 Len=607 Win=49232 Options=<nop,nop,tstamp 1195815396 3278302158>


Last edited by Scott; 06-16-2010 at 02:10 PM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

parse through one text file and output many

Hi, everyone The input file pattern is like below: Begin Object1 txt1 end ; Begin Object2 txt2 end ; ... (14 Replies)
Discussion started by: sophiadun
14 Replies

2. Shell Programming and Scripting

Parse Logfile output variable

<SUMMARY filecount_excluded="0" dirbytes_sent="3367893" dirbytes_hashcache="13275664" ..and so on..> <session numthreads="1" type="avtarbackup" ndispatchers="1" ..and so on..><host numprocs="4" speed="900" osuser="root" name="ashsux01" memory="24545" /><build time="11:04:53" msgversion="13-10" ... (11 Replies)
Discussion started by: Ikon
11 Replies

3. Shell Programming and Scripting

Script to capture snoop output

Hi Everyone :), Need your advice as I'm new to UNIX scripting.. I'm trying to write a script to capture snoop output for 5 minutes for every hour for 24 hours. To stop snoop, I need to press Control-C to break it. This is what I got so far, but now I'm stuck! :confused: The script: # cat... (2 Replies)
Discussion started by: faraaris
2 Replies

4. Shell Programming and Scripting

Want to parse output for variables in Bash

Trying to finish up my script that automates some video encoding work. Situation: There is an MKV file to be transcoded. Problem: MKVINFO will give a bunch of output about an MKV file, included in that output are two lines I am interested in: | + Default duration: 41.708ms (23.976 fps... (9 Replies)
Discussion started by: randyharris
9 Replies

5. UNIX for Dummies Questions & Answers

How to parse 2 particular lines from Command output

Hi All, I need help on the following req. I am getting output of a command as follows: 16377612 total memory 3802460 used memory 2827076 active memory 681948 inactive memory 12575152 free memory 477452 buffer memory I want to compute used... (1 Reply)
Discussion started by: mailsara
1 Replies

6. Shell Programming and Scripting

parse output line using bash

hi, i have the followiing scenario where by i am parsing teh following output using cut -d like so #!/bin/bash output="ABCTable| ------------------| | ------------------| code | name | amount |" col1= $output | cut -d'|' -f5 col2= $output | cut -d'|'... (1 Reply)
Discussion started by: nano2
1 Replies

7. Solaris

How to read the output of snoop command?

Hi! I have run the following command: snoop -q -d e1000g0 -o /var/tmp/optima0.txt & them I am trying to read the output of it with snoop -i /var/tmp/optima0.txt, which is giving me this: # snoop -i /var/tmp/optima0.txt | more 1 0.00000 AIOPTSVR -> 10.100.4.72 TCP D=1393 S=22 Push... (8 Replies)
Discussion started by: fretagi
8 Replies

8. Shell Programming and Scripting

awk to parse jil output

Hi , I have a jil file which i am trying to parse and print the job name and the condition corresponding to it. Below is the input file /* -------------------- testjob1 -------------------- */ insert_job: testjob1 job_type: c machine: unix owner: chidori condition: s(joba) and... (9 Replies)
Discussion started by: chidori
9 Replies

9. Shell Programming and Scripting

awk to parse df output

Output of the below code includes unmatched date.Please correct it df -k|awk '$4>50 {print $1, "\t"$4,"\t" $7}' It gives output less than 50% also. (5 Replies)
Discussion started by: vinil
5 Replies

10. Shell Programming and Scripting

Need help to parse iostat command output

Hi, I got the code below is one of the threads from this forum. lineCount=$(iostat | wc -l) numDevices=$(expr $lineCount - 7); iostat $interval -x -t | awk -v awkCpuFile=$cpuFile -v awkDeviceFile=$deviceFile -v awkNumDevices=$numDevices ' BEGIN { print... (2 Replies)
Discussion started by: gopivallabha
2 Replies
cgiSetHeader(3) 						Programmer's Manual						   cgiSetHeader(3)

NAME
cgiSetHeader - Specify an additional HTTP header SYNOPSYS
#include <cgi.h> int cgiSetHeader (char *name, char *value); DESCRIPTION
With the cgiSetHeader routine you may specify additional HTTP header lines such as Expires: or Pragma:. The order of header lines withing the HTTP header has no significance. You may call this routine multiple times to set multiple headers. They will be printed in the same order as specified, however, after the Content-type: header. This routine will only add the header to the internal stack, not print it. They will be printed by cgiHeader(3). This routine does some syntax checking before accepting a new header. The name of a header must not contain any newline, space or colon, otherwise it will be truncated. The value must not contain any newline, otherwise it will be truncated as well. To set a cookie in your program you'll need to manually add additional header lines. Please take a look at cgitest.c. Basically, you'll need to add the following code: cgiSetHeader ("Set-Cookie", "Version=1; name=value; Path=/"); cgiHeader(); Please read the included file cookies.txt as well. RETURN VALUE
On success 1 is returned, otherwise 0. AUTHOR
This CGI library is written by Martin Schulze <joey@infodrom.org>. If you have additions or improvements please get in touch with him. SEE ALSO
cgiHeader(3), cgiGetCookies(3), cgiGetCookie(3), cgiInit(3). CGI Library 6 April 2008 cgiSetHeader(3)
All times are GMT -4. The time now is 10:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy