Sponsored Content
Top Forums Shell Programming and Scripting Extract & Manipulate continous data stream-- tcpdump Post 302897511 by delphys on Monday 14th of April 2014 12:57:47 PM
Old 04-14-2014
Thank you very much but I am not getting any output..

Code:
 tcpdump | awk '/^[0-9]*:[0-9]*/ {src=$3} match($0, /IBM-32[^.]*\.[^.]*/) { str=substr($0,RSTART,RLENGTH);\
>  ibm[str]=src FS ibm[str] } END { for (i in ibm)  { print i, ibm[i] } }'
tcpdump: WARNING: Shared: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on Shared, link-type EN10MB (Ethernet), capture size 65535 bytes

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

manipulate data with specific format

Hi everybody: I have a problem with how I have to manipulate the data which have specific format like this: 249. 0.30727021E+05 0.30601627E+05 0.37470780E-01 -0.44745335E+02 0.82674536E+03 248. 0.30428182E+05 0.30302787E+05 0.40564921E-01 -0.45210293E+02 ... (5 Replies)
Discussion started by: tonet
5 Replies

2. UNIX for Dummies Questions & Answers

Excel data manipulate

All, I have the following format of data in a spreadsheet A 1 2 3 4 B 1 2 3 4 where 'A' is value of 'A1', '1 2 3 4' is value of cell B1, 'B' is value of cell A2, and '1 2 3 4' is value of cell B2. There... (12 Replies)
Discussion started by: rahulrathod
12 Replies

3. Shell Programming and Scripting

manipulate & format the output of spool command

Hi All, I am spooling the data some sql queries into a single file but wanted to know how to format the data of the file generated by spool. #!/bin/sh unset -f USAGE USAGE () { clear echo "############################USAGE#######################\n" echo "Incorrect number of... (2 Replies)
Discussion started by: ss_ss
2 Replies

4. Shell Programming and Scripting

how to manipulate with lines while playing with data

hello everyone, well I have a file which contains data, I want to add the data on hourly basis, like my file contains data for 24 hours, (so a total of 1440 ) lines. Now i want to add the data on hourly basis to get average values. like if I use (head) command it is ok for first go, but... (5 Replies)
Discussion started by: jojo123
5 Replies

5. Shell Programming and Scripting

Extract File line and manipulate

How can I print a section of each line in a text file. Eg CODE1 XYR Test2 10319389 CODE2 XYR Test2 10319389 CODE3 XYR Test2 10319389 CODE4 XYR Test2 10319389 CODE5 XYR Test2 10319389 First thing that would be nice would a new file like, awk sed and substring may help but can't figure it... (6 Replies)
Discussion started by: kelseyh
6 Replies

6. OS X (Apple)

Text stream K&R exercises

Hello, ladies, gentlemen. First I suppose I should introduce myself. I've been poking at C since a long time ago, somewhere around 1990. (Don't misinterpret that. "Poking at C", in this statement, means that I jumped on it, studied it for anything from a day to a weekend to a finished "Hello,... (21 Replies)
Discussion started by: Jammer Six
21 Replies

7. Shell Programming and Scripting

Extract data from an XML file & write into a CSV file

Hi All, I am having an XML tag like: <detail sim_ser_no_1="898407109001000090" imsi_1="452070001000090"> <security>ADM1=????</security> <security>PIN1=????</security> <security>PIN2=????</security> ... (2 Replies)
Discussion started by: ss_ss
2 Replies

8. Shell Programming and Scripting

Extract a specific line from a stream

Hello, I'm trying to code a bash script and I was wondering how to extract a specific line from a stream. E.g. My file "file" contains three lines and i'd like to find a function f which returns after execution a specific line like the second line, which would be : f(file, 2) = Second... (4 Replies)
Discussion started by: Oddant
4 Replies

9. Shell Programming and Scripting

Manipulate XML File Continous STRING by each Order Line using SHELL

heres sample File: <?xml version="1.0"?> <!DOCTYPE cXML SYSTEM "www"><cXML.............................................. <OrderRequest>USE UNIX.com</Extrinsic><Extrinsic name="UniqueName">Peter@UNIX.com</Extrinsic><Extrinsic name="ContractingEntity">UNIX... (3 Replies)
Discussion started by: Pete.kriya
3 Replies

10. Shell Programming and Scripting

Need help to manipulate data using script

Hi i want to manipulate my data to convert row to column name 600 Slno vlan 1 600 2 609 3 700 name 700 Slno vlan 1 600 2 609 3 700 (8 Replies)
Discussion started by: nith_anandan
8 Replies
TCPDUMP2XPLOT(1)					    BSD General Commands Manual 					  TCPDUMP2XPLOT(1)

NAME
tcpdump2xplot -- converts tcpdump output to xplot input for analysis SYNOPSIS
tcpdump2xplot [-?] [-c] [-help] [-list[filename]] [-plot[filename]] [-q] [-r] [-s] [-t] [-w] DESCRIPTION
tcpdump2xplot takes the output of tcpdump -tt -S ... and plots it in terms of sequence-number versus time, with other info displayed (e.g., the TCP window, acks, etc.). OPTIONS
-?, -help prints a help message. -c, ``cumulative'', adds all the data coming from a server. -list[filename] prints the list of generated plot files to filename. -plot[filename] plots the packets from filename. The filename may be built out of a hostname and port number, e.g.: abc.def.com:1234. The default is fromhost:fromport-tohost:toport.xplot where fromhost, fromport, thost, toport are extracted as conversations from the tcpdump data. -q means "quiet" --- no visible output. -r means use relative sequence numbers. -s means break up conversations on TCP syns. -t convert time to decimal number of seconds. -w plots the TCP window. EXAMPLES
SEE ALSO
tcpdump(1), xplot.org(1) BUGS
tcpdump2xplot may not deal properly with output from tcpdump that is not TCP. Either filter to only tcp or be careful. HISTORY
The tcpdump2xplot has been contributed by xplot.org users. Thanks to Garret Wollman for contributing the original tcpdump2xplot.pl script and thanks to Eric Prud'hommeaux (@ w3.org) for making <http://www.w3.org/pub/WWW/config/tcpdump2xplot.pl> available, a much improved ver- sion. The one included here is a slightly improved version of Eric's. BSD
27 January 1999 BSD
All times are GMT -4. The time now is 06:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy