08-15-2011
Thank you h@ foorsa . biz
But :
I have i condition in my code
if or switch ( $1 is equal to next value in $1 )
( make an average for adjacent $2 )
then print timestamp value and average for specific timestamp
then go to next.
I've tried work with arrays but I could not do it
thank you
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello. Im just starting to learn awk so hang in there with me...I have a large text file formatted as such everything is in a single column
ID001
value 1
value 2
value....n
ID002
value 1
value 2
value... n
I want to be able to calculate the average for values for each ID from the... (18 Replies)
Discussion started by: johnmillsbro
18 Replies
2. Shell Programming and Scripting
Dear Guyz:)
I have 2 different input files like this. I would like to pick the values or letters from the inputfile2 based on inputfile1 keys (A,F,N,X,Z).
I have done similar task by using awk but in that case the inputfiles are similar like in inputfile2 (all keys in 1st column and values in... (16 Replies)
Discussion started by: repinementer
16 Replies
3. Shell Programming and Scripting
Hi all,
I have a file (say file.txt) which contains comma-separated rows. Each row has seven columns. Only column 4 or 5 (not both) can have empty values like "" in each line.
Sample lines
So, now i want all the rows that have column 4 as "" go in file1.txt and all the rows that have column... (8 Replies)
Discussion started by: jakSun8
8 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a tab delimited text file with two columns where the second column takes on values between 1 and 6 (including). If the value of the second column, includes 1,2,3 I want to replace it with LOW. If it is 4,5,6 I want to replace it with HIGH. How do I go about doing that? Thanks
... (3 Replies)
Discussion started by: evelibertine
3 Replies
5. Shell Programming and Scripting
Hello,
I have a data such as this:
ENSGALG00000000189 329 G A 4 2 0
ENSGALG00000000189 518 T C 5 1 0
ENSGALG00000000189 1104 G A 5 1 0
ENSGALG00000000187 3687 G T 5 1 0
ENSGALG00000000187 4533 A T 4 2 0
ENSGALG00000000233 5811 T C 4 2 0
ENSGALG00000000233 5998 C A 5 1 0
I want to... (3 Replies)
Discussion started by: Homa
3 Replies
6. Shell Programming and Scripting
Hi,
I have a table to be imported for R as matrix or data.frame but I first need to edit it because I've got several lines with the same identifier (1st column), so I want to sum the each column (2nd -nth) of each identifier (1st column)
The input is for example, after sorted:
K00001 1 1 4 3... (8 Replies)
Discussion started by: sargotrons
8 Replies
7. Shell Programming and Scripting
Hi All,
I am trying to achieve the below logic, could you please help me in this.
In second row 2nd column I've Value JC2 and the same JC2 is 4th row 1st column.So I need to replace JC2 value in 4th row with JC2 2nd row's 1st column.
Input:
Job1,JC1
Job1,JC2
Job1,JC3
JC2,JA1... (6 Replies)
Discussion started by: unme
6 Replies
8. UNIX for Dummies Questions & Answers
Dear all ...
I have a file which I want to change the structure based on the values in some columns and I would be grateful if you can help...
one of my files looks like ... they all have ten rows
1,0,0
10,0,0
2,0,0
3,0,0
4,1,1
4,1,1
4,1,1
5,0,0
6,0,0
7,0,0
8,0.5,2
9,0.33,3
9,0.33,3... (1 Reply)
Discussion started by: A-V
1 Replies
9. Shell Programming and Scripting
I have a file (myfile.txt) with contents like this:
1.txt apple is
3.txt apple is
5.txt apple is
2.txt apple is a
7.txt apple is a
8.txt apple is a fruit
4.txt orange not a fruit
6.txt zero isThe above file is already sorted using this command:
sort -k2 myfile.txtMy objective is to get... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies
10. UNIX for Beginners Questions & Answers
Hi there,
I am trying to filter a big file with several columns using values on a column with values like (AC=5;AN=10;SF=341,377,517,643,662;VRT=1). I wont to filter the data based on SF= values that are (bigger than 400)
... (25 Replies)
Discussion started by: daashti
25 Replies
LEARN ABOUT SUSE
capinfos
CAPINFOS(1) The Wireshark Network Analyzer CAPINFOS(1)
NAME
capinfos - Prints information about capture files
SYNOPSIS
capinfos [ -t ] [ -E ] [ -c ] [ -s ] [ -d ] [ -u ] [ -a ] [ -e ] [ -y ] [ -i ] [ -z ] [ -x ] [ -h ] <infile> ...
DESCRIPTION
Capinfos is a program that reads one or more capture files and returns some or all available statistics of each <infile>.
The user specifies which statistics to report by specifying flags corresponding to the statistic. If no flags are specified, Capinfos will
report all statistics available.
Capinfos is able to detect and read the same capture files that are supported by Wireshark. The input files don't need a specific filename
extension; the file format and an optional gzip compression will be automatically detected. Near the beginning of the DESCRIPTION section
of wireshark(1) or http://www.wireshark.org/docs/man-pages/wireshark.html <http://www.wireshark.org/docs/man-pages/wireshark.html> is a
detailed description of the way Wireshark handles this, which is the same way Capinfos handles this.
OPTIONS
-t Displays the capture type of the capture file.
-E Displays the per-file encapsulation of the capture file.
-c Counts the number of packets in the capture file.
-s Displays the size of the file, in bytes. This reports the size of the capture file itself.
-d Displays the total length of all packets in the file, in bytes. This counts the size of the packets as they appeared in their original
form, not as they appear in this file. For example, if a packet was originally 1514 bytes and only 256 of those bytes were saved to
the capture file (if packets were captured with a snaplen or other slicing option), Capinfos will consider the packet to have been 1514
bytes.
-u Displays the capture duration, in seconds. This is the difference in time between the earliest packet seen and latest packet seen.
-a Displays the start time of the capture. Capinfos considers the earliest timestamp seen to be the start time, so the first packet in
the capture is not necessarily the earliest - if packets exist "out-of-order", time-wise, in the capture, Capinfos detects this.
-e Displays the end time of the capture. Capinfos considers the latest timestamp seen to be the end time, so the last packet in the
capture is not necessarily the latest - if packets exist "out-of-order", time-wise, in the capture, Capinfos detects this.
-y Displays the average data rate, in bytes/sec
-i Displays the average data rate, in bits/sec
-z displays the average packet size, in bytes
-x displays the average packet rate, in packets/sec
-h Prints the help listing and exits.
SEE ALSO
tcpdump(8), pcap(3), wireshark(1), mergecap(1), editcap(1), tshark(1), dumpcap(1)
NOTES
Capinfos is part of the Wireshark distribution. The latest version of Wireshark can be found at <http://www.wireshark.org>.
HTML versions of the Wireshark project man pages are available at: http://www.wireshark.org/docs/man-pages
<http://www.wireshark.org/docs/man-pages>.
AUTHORS
Original Author
-------- ------
Ian Schorr <ian[AT]ianschorr.com>
Contributors
------------
Gerald Combs <gerald[AT]wireshark.org>
1.2.8 2010-05-05 CAPINFOS(1)