Can some one provide me a shell script.
I have file with many columns and many rows. need to sort the first column and then remove the duplicates records if exists.. finally print the full data with first coulm as unique.
Sort BASED ON FIRST FIELD and remove the duplicates if exists... (2 Replies)
Hi All,
I needs to fetch unique records based on a keycolumn(ie., first column1) and also I needs to get the records which are having max value on column2 in sorted manner... and duplicates have to store in another output file.
Input :
Input.txt
1234,0,x
1234,1,y
5678,10,z
9999,10,k... (7 Replies)
Hi,
I am unable to search the duplicates in a file based on the 1st,2nd,4th,5th columns in a file and also remove the duplicates in the same file.
Source filename: Filename.csv
"1","ccc","information","5000","temp","concept","new"
"1","ddd","information","6000","temp","concept","new"... (2 Replies)
Hi,
I'm using the below command to sort and remove duplicates in a file. But, i need to make this applied to the same file instead of directing it to another.
Thanks (6 Replies)
Hi ,
I have below data inside a file named ref.psv . I want to create a shell script which will do the below 2 points :
(1) sort the file content first based on the latest date which is the last column in the file (actual file its the 175th column)
(2)after sorting the file based on latest date... (3 Replies)
I need to use bash to remove duplicates without using sort first.
I can not use:
cat file | sort | uniq
But when I use only
cat file | uniq
some duplicates are not removed. (4 Replies)
Hi guys,Got a bit of a bind I'm in. I'm looking to remove duplicates from a pipe delimited file, but do so based on 2 columns. Sounds easy enough, but here's the kicker...
Column #1 is a simple ID, which is used to identify the duplicate.
Once dups are identified, I need to only keep the one... (2 Replies)
Here is my task :
I need to sort two input files and remove duplicates in the output files :
Sort by 13 characters from 97 Ascending
Sort by 1 characters from 96 Ascending
If duplicates are found retain the first value in the file
the input files are variable length, convert... (4 Replies)
Following is the input. 1st and 3rd block are same(block starts here with '*' and ends before blank line) , 2nd and 4th blocks are also the same:
cat <file>
* Wed Feb 24 2016 Tariq Saeed <tariq.x.saeed@mail.com> 2.0.7-1.0.7
- add vmcore dump support for ocfs2
* Mon Jun 8 2015 Brian Maly... (4 Replies)
Discussion started by: Paras Pandey
4 Replies
LEARN ABOUT DEBIAN
tracetopends
TRACETOPENDS(1) User Commands TRACETOPENDS(1)NAME
tracetopends - reports the endpoints that are responsible for the most traffic in a trace
SYNOPSIS
tracetopends [ -f bpf ] [ -A addrtype ] [ -s ] [ -d ] [ -b ] [ -a ] [ -p ] [ -n topcount ] inputuri [inputuri ...]
DESCRIPTION
tracetopends reports the number of bytes and packets sent and received by the busiest endpoints observed in the input trace(s).
-f bpf filter
Output only packets that match tcpdump style bpf filter.
-n top count
Report the top N endpoints (defaults to 10).
-A address type
Specifies how an endpoint should be defined. Suitable options are "mac", "v4" and "v6" which will report endpoint stats for each
observed MAC address, IPv4 address and IPv6 address respectively.
-s Sort endpoints based on the amount of outgoing traffic (will cancel any previous -d option. This is on by default.
-d Sort endpoints based on the amount of incoming traffic (will cancel any previous -s option.
-b Sort endpoints based on the amount of IP traffic (will cancel any previous -a or -p options. This is on by default.
-a Sort endpoints based on the amount of application layer traffic (will cancel any previous -b or -p options.
-p Sort endpoints based on the amount of packets (will cancel any previous -b or -a options.
OUTPUT
Output is written to stdout in columns separated by blank space.
The columns are (in order):
* Endpoint address
* Time last observed
* Packets originating from the endpoint
* Bytes originating from the endpoint (IP header onwards)
* Payload originating from the endpoint (post transport header)
* Packets sent to the endpoint
* Bytes sent to the endpoint (IP header onwards)
* Payload sent to the endpoint (post transport header)
EXAMPLES
Find the IPv4 addresses that are sending the most traffic.
tracetopends -A v4 -b -s erf:trace.erf.gz
LINKS
More details about tracetopends (and libtrace) can be found at http://www.wand.net.nz/trac/libtrace/wiki/UserDocumentation
SEE ALSO libtrace(3), tracemerge(1), tracefilter(1), traceconvert(1), tracesplit_dir(1), tracereport(1), tracertstats(1), tracestats(1), tracepkt-
dump(1), traceanon(1), tracesummary(1), tracereplay(1), tracediff(1), traceends(1)AUTHORS
Shane Alcock <salcock@cs.waikato.ac.nz>
tracetopends (libtrace) September 2011 TRACETOPENDS(1)