Search Results

Search: Posts Made By: wolf_blue
23,352
Posted By jayan_jay
To fulfill wolf request, modified ranga's code ...
To fulfill wolf request, modified ranga's code

$ nawk '{a=$5-$4;print $0,a}' infile | sort +5nr | nawk '!x[$1]++'
A2LD1 chr13 - 101182417 101241046 58629
A2ML1 chr12 + 8975149 9029377 54228
A2M...
23,352
Posted By Skrynesaver
The following script only prints the instance of...
The following script only prints the instance of any duplicate with the highest value of the new final field.

perl -e 'while(<>){
chomp;
@fields=split(/ /,$_);
if (($fields[4] -...
23,352
Posted By rangarasan
AWK
Hi,

Try this one,


awk '{a=$5-$4;print $0,a;}' Input_File


For unique lines try this one,


awk 'BEGIN{re=0;}{if(re != $1 ){a=$5-$4;print $0,a;re=$1;}}' Input_File


Cheers,...
1,878
Posted By ctsgnb
nawk '!A[$1]++' test.txt
nawk '!A[$1]++' test.txt
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 06:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy