10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have a dateset like this:
Gly1 Gly2 2 1 0
Gly3 Gly4 3 4 5
Gly3 Gly5 1 3 2
Gly2 Gly1 3 6 2
Gly4 Gly3 2 2 1
Gly6 Gly4 4 2 1what I expected is:
Gly1 Gly2 2 1 0
Gly2 Gly1 3 6 2
Gly3 Gly4 3 4 5
Gly4 Gly3 2 2 1
A vs B, or B vs A are the same... (7 Replies)
Discussion started by: nengcheng
7 Replies
2. Shell Programming and Scripting
I want to select 2nd, 3rd columns if line has "key3" and print rest of the lines as is.
# This is my sample input
key1="val1" key2="val2" key3="val3" key4="val4"
some text some text
some text some text
key1="val1" key2="val2" key3="val3" key4="val4"
some text some text
some text some... (3 Replies)
Discussion started by: kchinnam
3 Replies
3. Shell Programming and Scripting
Hi,
I can select all the even columns from a file like this:
awk '{ for (i=1;i<=NF;i+=2) $i="" }1' file > new file
How can I select the 1st and all the even columns using awk? Thanks! (1 Reply)
Discussion started by: forU
1 Replies
4. Shell Programming and Scripting
Hi , I want to compare first 3 columns of File A and File B and create a new file File C which will have all rows from File B and will include rows that are present in File A and not in File B based on First 3 column comparison.
Thanks in advance for your help.
File A
A,B,C,45,46... (2 Replies)
Discussion started by: ady_koolz
2 Replies
5. Shell Programming and Scripting
Dear All,
Please help me, I have file input like this,
1 2142
215 2162
217 2842
285 2862
287 4002
401 4022
403 4822
1 2142
215 2162
217 2842
285 2862
287 4002
401 4022
403 4882
1 4801 (8 Replies)
Discussion started by: attila
8 Replies
6. Shell Programming and Scripting
I have a file with 20 columns. I'd like to retain only the lines for which the values in at least x columns, looking only at columns 6-20, are above a threshold.
For example, I'd like to retain only the lines in the file below that have at least 8 columns (again, looking only at columns 6-20)... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
7. Shell Programming and Scripting
I have a huge matrix file which looks like this (example matrix):
1 2 3 5
4 5 6 7
7 6 8 9
1 2 4 2
7 6 5 1
3 2 1 9
As one can see, this matrix has 4 columns and 6 rows. But my original matrix has some 3 million rows and 6000 columns.
For example, on this matrix I can define my task as... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies
8. Shell Programming and Scripting
i have a file of the form
9488 14392 1 1.8586e-07
5702 7729 1 1.8586e-07
9048 14018 1 1.8586e-07
5992 12556 1 1.8586e-07
9488 14393 1 1.8586e-07
9048 14019 1 1.8586e-07
5992 12557 1 1.8586e-07
9488 14394 ... (1 Reply)
Discussion started by: vaibhavkorde
1 Replies
9. Shell Programming and Scripting
Select and display sum depending upon even columns
i have a input as :
2898 | homy | pune | 7/4/09
1 :6298 | anna | chennai | 7/4/08
2 :3728 | gonna | kol | 8/2/10
3 :3987 | hogja | mumbai | 8/5/09
4 :6187 | galma | london | 9/5/01
5 :9167 | tamina | ny | 8/3/10
6 :3981 | dastan | bagh |... (1 Reply)
Discussion started by: adityamitra
1 Replies
10. UNIX for Dummies Questions & Answers
i have a input as :
2898 | homy | pune | 7/4/09
1 :6298 | anna | chennai | 7/4/08
2 :3728 | gonna | kol | 8/2/10
3 :3987 | hogja | mumbai | 8/5/09
4 :6187 | galma | london | 9/5/01
5 :9167 | tamina | ny | 8/3/10
6 :3981 | dastan | bagh | 8/2/07
7 :4617 | vazir | ny
now,i want to get... (2 Replies)
Discussion started by: adityamitra
2 Replies