Search Results

Search: Posts Made By: polsum
1,695
Posted By polsum
Thanks a lot, this is working. I didnt know how...
Thanks a lot, this is working. I didnt know how to use split function. Learned something today. :D

---------- Post updated at 08:09 PM ---------- Previous update was at 08:08 PM ----------

...
1,695
Posted By polsum
Awk:substitution of characters between two file elements
Hi,

I have file1 like this:

a 64
b 66
c 67and file2 like this:
@1234
1123
aabbcc
@5453
5543
ccbaI want to replace each letter of the third line in file2 with corresponding number in...
1,949
Posted By polsum
Thanks.:)
Thanks.:)
1,949
Posted By polsum
You rock, as always ! I need an advise from...
You rock, as always !

I need an advise from you. I want to learn AWK, can you please suggest a book? or online tutorial? Thanks :b:
1,949
Posted By polsum
Yes. I am using Ubuntu latest version. thanks ...
Yes. I am using Ubuntu latest version. thanks

---------- Post updated 03-17-12 at 11:08 AM ---------- Previous update was 03-16-12 at 11:18 PM ----------

Anyone? I edited the desired output in...
1,949
Posted By polsum
Grouping and calculation of percentages
Hi,

I have a table like this,

Group type L1 L2 L3 L4 L5 L6
A xx1 0 3 3 2 1 0
A xx2 2 2 2 1 7 2
B yy1 2 4 ...
2,130
Posted By polsum
THanks for the reply. Sorry I was unable to...
THanks for the reply. Sorry I was unable to explain properly in the first post.

The idea is that in each row, each group must contain three exactly same type of element. For example, one group...
2,130
Posted By polsum
Print lines containing same values in a group
Hi,

I have a table like this:

Name A1 A2 A3 B1 B2 B3

111 abc abc abc cbc cbc cbc
222 acv acv n_n bbc bbc bbc
333 bvv bvv bvv cBx ccx ccx
444 ...
2,810
Posted By polsum
Filtering lines for column elements based on corresponding counts in another column
Hi,

I have a file like this

ACC 2 2 21 aaa
AC 443 3 22 aaa
GCT 76 1 33 xxx
TCG 34 2 33 aaa
ACGT 33 1 22 ggg
TTC 99 3 44 wee
CCA 33 2 33 ggg
AAC 1 3 55 ddd
TTG 10 1 22 ddd ...
3,592
Posted By polsum
thanks a lot :b::b:
thanks a lot :b::b:
3,592
Posted By polsum
awk 'NR==FNR{a[$1]=1;next}($1 in a) && $2 >...
awk 'NR==FNR{a[$1]=1;next}($1 in a) && $2 > a[$1]{a[$1]=$2}END{for(i in a)print i, a[i]}' file1 file2Hi Franklin52, thanks a lot for the reply. Its working just fine.

However, I also have another...
3,592
Posted By polsum
Match one column of file1 with that of file2
Hi,

I have file1 like this

aaa
ggg
ddd
vvv
eeeand file2
aaa 2
aaa 443
xxx 76
aaa 34
ggg 33
wee 99
ggg 33
ddd 1
ddd 10
ddd 98
sds 23
5,202
Posted By polsum
Now this code is working just fine.:) Thanks a...
Now this code is working just fine.:) Thanks a lot. I dont understand why the first one is not working though.
5,202
Posted By polsum
I tried that, but still not working. Your first...
I tried that, but still not working. Your first code (for just 2 files)
awk '{if($1 in a){sub("0" FS,"",a[$1]);a[$1]=a[$1] FS $2}else{a[$1]="0" FS2}}END{for(i in a)print i,a[i]}'
works just fine...
5,202
Posted By polsum
Hi, this code is working for the above mentioned...
Hi, this code is working for the above mentioned example data, but its not working for the following tables. May I know why and how should I rectify the problem? thanks.

file 1

file 2
...
2,376
Posted By polsum
Thank you very much guys. Both are working great.
Thank you very much guys. Both are working great.
2,376
Posted By polsum
Print Lines between two regexes
Hi I have a file like this

I need to delete all the lines between SQ and // and not the lines containing them.

So the desired output should be

I tried by using flip-flop operator
perl -wlne...
5,202
Posted By polsum
thank you very much. its working perfect. have a...
thank you very much. its working perfect. have a great weekend:b:
5,202
Posted By polsum
@yinyuemi thanks a lot. I actually have 4...
@yinyuemi

thanks a lot. I actually have 4 files to merge...for simplicity sake I used 2 files here...when I applied this code to 4 files, I dont see all columns...How can I modify this code?...
5,202
Posted By polsum
Merge columns of different files
Hi,

I have tab limited file 1

and tab limited file 2
The output should contain common first column vales and corresponding 2nd column values; AND also unique first column value with...
2,992
Posted By polsum
Compare Columns of two files
Hi

I have file 1 like this

and file 2 like this

I need to compare column 3 of both files and delete lines in file1 with same column 3 values in two files. So the output is

I tried with...
4,301
Posted By polsum
thnak you bartus, it is working great....:b:
thnak you bartus, it is working great....:b:
4,301
Posted By polsum
Perl: compare columns of two files
Hi

I have file 1 like this:
file 2 is like this:
The files are tab separated. I want to search for the first column values of file 1 in the first column of file 2 and merge the 3rd column value...
7,588
Posted By polsum
Thank you very much every one. After few hours of...
Thank you very much every one. After few hours of head banging, I came up with my own code which seems to be working fine. yay!

#! /usr/local/bin/perl
use warnings;
use strict;
my %hash;
my...
7,588
Posted By polsum
thanks for the reply - but eventhough its NOT...
thanks for the reply - but eventhough its NOT printing the repetitive values, its not printing all the remaining values.

the out put was

4 18 1 - chromosome 18, 70056996 TACCCAACAACACATAGT
9...
Showing results 1 to 25 of 55

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