Find duplicate values in specific column and delete all the duplicate values
Dear folks
I have a map file of around 54K lines and some of the values in the second column have the same value and I want to find them and delete all of the same values. I looked over duplicate commands but my case is not to keep one of the duplicate values. I want to remove all of the same values in the specific column.
Say part of my input data is like this example:
my desire output is:
Thanks in advance
I have a text file names test2 with 3 columns as below . We have to retrieve the distinct values (not duplicate) from 2nd column and display. I have used the below command but giving some error.
NS3303 NS CRAFT LTD
NS3303 NS CHIRON VACCINES LTD
NS3303 NS ALLIED MEDICARE LTD
NS3303 NS... (16 Replies)
I have file which as 12 columns and values like this
1,2,3,4,5
a,b,c,d,e
b,c,a,e,f
a,b,e,a,h
if you see the first column has duplicate values, I need to identify (print it to console) the duplicate value (which is 'a') and also remove duplicate values like below. I could be in two... (5 Replies)
Hi I have a file like this. I need to eliminate lines with first column having the same value 10 times.
13 18 1 + chromosome 1, 122638287 AGAGTATGGTCGCGGTTG
13 18 1 + chromosome 1, 128904080 AGAGTATGGTCGCGGTTG
13 18 1 - chromosome 14, 13627938 CAACCGCGACCATACTCT
13 18 1 + chromosome 1,... (5 Replies)
Hi, I've got a file that I'd like to uniquely sort based on column 2 (values in column 2 begin with "comp").
I tried sort -t -nuk2,3 file.txtBut got:
sort: multi-character tab `-nuk2,3'
"man sort" did not help me out
Any pointers?
Input:
Output: (5 Replies)
Hello experts,
I have a requirement where I have to implement two checks on a csv file:
1. Check to see if the value in first column is duplicate, if any value is duplicate script should exit.
2. Check to verify if the value at second column is between "yes" or "no", if it is anything else... (4 Replies)
Dear Experts,
Kindly help me please,
I have a big file where there is duplicate values in col 11 till col 23, every 2 rows appers a new numbers, but in each row there is different coordinates x and y in col 57 till col 74.
Please i will like to get a single value and average of the x and y... (8 Replies)
Input
1,ABCD,no
2,system,yes
3,ABCD,yes
4,XYZ,no
5,XYZ,yes
6,pc,noCode used to find duplicate with regard to 2nd column
awk 'NR == 1 {p=$2; next} p == $2 { print "Line" NR "$2 is duplicated"} {p=$2}' FS="," ./input.csv
Now is there a wise way to de-duplicate the entire line (remove... (4 Replies)
Hello,
I have a script that is generating a tab delimited output file.
num Name PCA_A1 PCA_A2 PCA_A3
0 compound_00 -3.5054 -1.1207 -2.4372
1 compound_01 -2.2641 0.4287 -1.6120
3 compound_03 -1.3053 1.8495 ... (3 Replies)
Hi Gurus,
I have a file(weblog) as below
abc|xyz|123|agentcode=sample code abcdeeess,agentcode=sample code abcdeeess,agentcode=sample code abcdeeess|agentadd=abcd stereet 23343,agentadd=abcd stereet 23343
sss|wwq|999|agentcode=sample1 code wqwdeeess,gentcode=sample1 code... (4 Replies)
I have a file with 5 columns. I want to pull out all records where the value in column 4 is not unique. For example in the sample below, I would want it to print out all lines except for the last two.
40991764 2419 724 47182 Cand A
40992936 3591 724 47182 Cand B
40993016 3671 724 47182 Cand C... (5 Replies)
Discussion started by: kaktus
5 Replies
LEARN ABOUT DEBIAN
sdlx::sound
pods::SDLx::Sound(3pm) User Contributed Perl Documentation pods::SDLx::Sound(3pm)NAME
SDLx::Sound - SDL sound extension
CATEGORY
Extension
SYNOPSIS
use SDLx::Sound;
my $snd = SDLx::Sound->new();
# loads and plays a single sound now
$snd->play('myfile.wav');
# load a single file
$snd->load('theSound.aif');
# plays it or all loaded files
$snd->play();
# more sounds
my %files = (
channel_01 => "/my_sound1.wav",
channel_02 => "/my_sound2.ogg"
);
# times sounds bangs
my %times = (
channel_01 => 0, # start
channel_01 => 1256, # milliseconds
channel_02 => 2345
);
# Load files in channels for realtime play
$snd->load(%files);
# sets sound channel_01 loudness
$snd->loud('channel_01', 80); # loud at 80%
$snd->play(%times); # play loaded files at times
$snd->play; # play again
# plays sound channel_01 at 578 milliseconds from now
$snd->play('channel_01', 578);
# fades sound
$snd->fade('channel_02', 2345, 3456, -20);
# in a single act do the whole Sound
my $snd = SDLx::Sound->new(
files => (
channel_01 => "/my_sound1.wav",
channel_02 => "/my_sound2.ogg"
),
loud => (
channel_01 => 80,
channel_02 => 75
),
times => (
channel_01 => 0, # start
channel_01 => 1256, # milliseconds
channel_02 => 2345
),
fade => (
channel_02 => [2345, 3456, -20]
)
)->play();
DESCRIPTION
You can think about the SDLx::Sound at 2 approaches.
o A simple sound or
o The sound of your game or app.
Your application will say what the best approach.
In a taste that resembles to perl and to SDL, our SDLx:Sound hooks at SDL::Audio and SDL::Mixer with a graceful and simple interface that
can offer to monks a modern perlish way to manage sounds.
An SDLx::Sound object can load sounds from filesystem, play it, adjust this loudness level or stops the sound.
Each sound will play in the next available channel, so it can be handled isolately.
METHODS
new
Returns a new instance of SDLx::Sound
load
play
$sdlx_sound->play('file.wav');
Play a file
pause
resume
stop
AUTHORS
See "AUTHORS" in SDL.
COPYRIGHT & LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-05-28 pods::SDLx::Sound(3pm)