Search Results

Search: Posts Made By: coppuca
7,007
Posted By coppuca
Thank you! It works :) The chr1_17232_18061 was...
Thank you! It works :) The chr1_17232_18061 was an accident.
Could you please explain how does awk '!a[$1]++' work? It collapses the rows with the same pattern in given column?
7,007
Posted By coppuca
Print a row with the max number in a column
Hello,


I have this table:

chr1_16857_17742 - chr1 17369 17436 "ENST00000619216.1"; "MIR6859-1"; - 67
chr1_16857_17742 - chr1 14404 ...
3,263
Posted By coppuca
Print first row of column a, last row of column b if column a has the same value
I have a table with this structure:

cola colb colc
1 19 lemon
20 31 lemon
32 100 lemon
159 205 cherries
210 500 cherries

and need to parse it into this format:

cola colb colc
1 100...
2,246
Posted By coppuca
My system is: Linux helix...
My system is:
Linux helix 2.6.32-431.23.3.el6.x86_64 #1 SMP Thu Jul 31 17:20:51 UTC 2014 x86_64 x86_64 x86_64 GNU/LinuxAnd when I do qstat -u user, it shows:


...
2,246
Posted By coppuca
Pbs script path from the id
Is it possible to lookup the path to the pbs script by Job ID? I cannot find the answer anywhere.
3,536
Posted By coppuca
Thank you very much! It's working :)
Thank you very much! It's working :)
3,536
Posted By coppuca
I need to exclude the lines
I need to exclude the lines
3,536
Posted By coppuca
Exclude variable from a file
Hello,

I have a list of patterns which I'd like to exclude from a file. I tried to do


while read line
do
grep -v $line file >> new.file
done < mylist


But obviously it won't work. It...
2,557
Posted By coppuca
This is not the case but then it will all go into...
This is not the case but then it will all go into the first (and only) file.
2,557
Posted By coppuca
I might have worded it wrong, sorry for the...
I might have worded it wrong, sorry for the confusion. I don't want every line with the same first column in a separate file. I need to split file in, let's say 10 files, but check it for not putting...
2,557
Posted By coppuca
Split a file into parts only if the first field is different
Hi, I have a file like this:


aaa 123
aaa 223
aaa 225
bbb 332
bbb 423
bbb 6755
bbb 324
ccc 112
ccc 234
ccc 897


Which I need to split into several files, something like
split -l 3...
1,155
Posted By coppuca
i need to grep a line without first field from...
i need to grep a line without first field from file1 (basically, fields 2-6) and find them in file2. join won't work because it would find exact matches, and I need everything: if only field2 matches...
1,155
Posted By coppuca
Find fields from one file in the other file
I need to find (basically, grep) matching lines ignoring the first field from file1:

field1 field2 field3 field4 field5 field6
id1 carrot white small
id2 carrot
id3 potato black...
3,455
Posted By coppuca
It works! Thank you so much, Yoda! Could you...
It works! Thank you so much, Yoda! Could you please briefly explain what does it do? I'm trying to learn awk.
3,455
Posted By coppuca
Count duplicate lines ignoring certain columns
I have this structure:


col1 col2 col3 col4 col5
27 xxx 38 aaa ttt
2 xxx 38 aaa yyy
1 xxx 38 aaa yyy

I need to collapse duplicate lines ignoring column 1 and add values of duplicate lines...
1,461
Posted By coppuca
it doesn't have to be '--', it can be just tab...
it doesn't have to be '--', it can be just tab but it has to be something...
1,461
Posted By coppuca
Merging multiple files into one
Hi guys,

could you please help me with this?

I have multiple files with this structure:

file1
xxx1 1.0
xxx2 3.5
xxx3 2.4
xxx4 3.0


xxx1890 5.7

file2
xxx1 8.0
xxx3 7.5...
6,934
Posted By coppuca
When I write this script as a file and run it (...
When I write this script as a file and run it ( $awk sort.awk file1 > file2) it writes: awk: syntax error at source line 1 source file sort_col.awk
context is
awk >>> ' <<<
awk: bailing out at...
6,934
Posted By coppuca
doesn't work :(((
doesn't work :(((
6,934
Posted By coppuca
Vertical sorting of columns
Please help to sort columns in this file:

a b d f c e
1 4 10 16 7 13
2 5 11 17 8 14
3 6 12 18 9 15

I need to sort COLUMNS (so sort command doesn't work) like this:

a b c d e f ...
3,658
Posted By coppuca
Thank you! The loop works without ^.
Thank you! The loop works without ^.
3,658
Posted By coppuca
find lines from one file in the other and print them
Hi guys,
please help me to make a loop!

I have two files.

File 1
2
4
7

File2
1 abc
2 cde
3 ghgj
4 kjhn
5 mbm
6 hghj
7 hgjk

I need to write a script that reads lines from File1,...
Showing results 1 to 22 of 22

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