Search Results

Search: Posts Made By: aberg
1,807
Posted By aberg
Thanks, but that's just done something really...
Thanks, but that's just done something really weird:



sort -k 1.3,1 -g file2.txt


Output:


rs3 13 32446842 C T 0.942913 0.998618 0.000435162 0.000617777 4.8E-01
rs4 13 32447222 A G...
1,807
Posted By aberg
Thanks. I've just tried that: sort -t ' ' -k...
Thanks. I've just tried that:
sort -t ' ' -k 1,1 -g file2.txt

but still getting the same output...
1,807
Posted By aberg
Inconsistent results using sort function
Could you please advise on the following: I have two space-delimited files with 9 and 10 columns, respectively, with exactly the same values in column 1. However, the order of column 1 differs...
2,765
Posted By aberg
Thanks Jim - that works. Much appreciated. ...
Thanks Jim - that works. Much appreciated.

A.B.
2,765
Posted By aberg
awk function to remove lines that contain contents of another file
Hi,

I'd be grateful for your help with the following. I have a file (file.txt) with 10 columns and about half a million lines, which in simplified form looks like this:


ID Col1 Col2 ...
3,021
Posted By aberg
Thank you for the explanation - v. helpful.
Thank you for the explanation - v. helpful.
3,021
Posted By aberg
That's even more elegant and gives the same...
That's even more elegant and gives the same output. I'm struggling to understand how you managed to condense my four criteria into : ($3 > $4 || $3 == $4 && $5 < $6)

Re: if $3==$4 && $5==$6,...
3,021
Posted By aberg
I think that's worked.. thank you!!
I think that's worked.. thank you!!
3,021
Posted By aberg
Thank you RudiC. Yes, your interpretation...
Thank you RudiC.

Yes, your interpretation is correct, and it is vitally important that I populate an exclusion file. The original file itself should eventually grind itself down to 0 lines, and...
3,021
Posted By aberg
Thank you vbe. So could I incorporate that...
Thank you vbe.

So could I incorporate that into a bash script? Say I renamed my file.txt to 1.txt:


#! bin/bash
for i in {1..10000}
awk 'NR==1{print;}' $i.txt
awk '{if ($3>$4 || $3==$4 &&...
3,021
Posted By aberg
Yes, I want to append to the same list (rather...
Yes, I want to append to the same list (rather than over-writing), and I'm not sure how to do that.
Also, I want this to loop so that it starts again at the new line 1 once the original line 1...
3,021
Posted By aberg
awk command with a loop
Dear all,

I would be grateful for your help with the following.

I have the following file (file.txt), which is about 10,000 lines long:

ID1 ID2 0 1 0.5 0.6
ID3 ID4 0 0 0.4 0.8...
22,270
Posted By aberg
How to use grep in a loop using a bash script?
Dear all,

Please help with the following.

I have a file, let's call it data.txt, that has 3 columns and approx 700,000 lines, and looks like this:

rs1234 A C
rs1236 T G
rs2345 G T
...
1,183
Posted By aberg
Thanks RavinderSingh13 and rdrtx1. Much...
Thanks RavinderSingh13 and rdrtx1. Much appreciated.
1,183
Posted By aberg
Help with simple bash script involving a loop
Dear unix wizards,

I'd be very grateful for your help with the following.

I have a hypothetical file (file.txt) with three columns:

111 4 0.01
112 3 0.02
113 2 0.03
114 1 0.04
115 1...
6,656
Posted By aberg
Thanks for the quick reply. I've tried your...
Thanks for the quick reply. I've tried your version of the script. While it's now reading the files and actually executing the command, the output is completely unchanged from the original file 1......
6,656
Posted By aberg
awk to replace values in one file using a second reference file
Hi,

I'd be grateful for your help with the following:

I have a file with a single column (file1). Let's say the values are:

a
b
c
5
d

I have a second, reference file (ref_file), which...
5,638
Posted By aberg
Silly me. That now works. Thank you very much...
Silly me. That now works.
Thank you very much for your help.
AB
5,638
Posted By aberg
Here is the command that I thought was most...
Here is the command that I thought was most promising:

awk 'BEGIN{ FS="|" }
{ for(fn=1;fn<=NF;fn++) {print fn" = "$fn;}; exit; }
' filename.csv

But all I got was:
1 =...
5,638
Posted By aberg
Listing column names in CSV file
Hi,

I have a .csv file that has ~600 columns and thousands of rows. I would like to create a numerical list of the column names (so that I can later easily select the columns I want to extract)....
Showing results 1 to 20 of 20

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