Search Results

Search: Posts Made By: cs_novice
1,220
Posted By cs_novice
Don, @vgersh99 gave me a hint in a PM and using...
Don, @vgersh99 gave me a hint in a PM and using that I think, I have got the output I desired using the following awk code:

awk 'FNR==NR{f1[$1]=$2;next} $1 in f1 {print $0,f1[$1]}' first.txt...
1,220
Posted By cs_novice
Thanks @bakunin for the detailed explanation...
Thanks @bakunin for the detailed explanation regarding join. I also realized that my original question wasn't clear and I didn't really need to compare the files or capture the data in an array. I...
1,220
Posted By cs_novice
To clarify, the third.txt file is what I expect...
To clarify, the third.txt file is what I expect as output and I just put that out for illustration purposes. Reg my attempts: I tried capturing the the data in the first file data in an awk...
1,220
Posted By cs_novice
Text file parsing and comparison
I have two files (first.txt and second.txt):

more first.txt

cat mammal

lizard reptile

Elephant mammal

ant Insecta



more second.txt

...
1,043
Posted By cs_novice
Comparing Columns and writing a new file
I have a table with one column
File1.txt
1
2
3
4
5
6
7
8
9
10

Another table with two columns; This has got a subset of entries from File 1 but not unique because they have differing...
1,827
Posted By cs_novice
Thanks everyone! Your awk and sed code(s) work...
Thanks everyone! Your awk and sed code(s) work great! I was trying my best with the little sed I know but never quite managed it.
1,827
Posted By cs_novice
Deleting text start at 2nd line....
How can I delete the first '2' characters in the 2nd line and every fourth line thereafter (Means line no.s 2, 6, 10...so on).
For example if the following is my Input

treieieiei
trrpepepepep...
4,140
Posted By cs_novice
a bug(?) in the awk one liner for column comparison
Hello Friends
I have been using this awk one liner
awk 'NR==FNR{a[$4]=$5}a[$1]{print $0"\t"a[$1]}' Gene_Count.txt Pval.txt
to compare field 4 of the file Gene_Count.txt to field 1...
4,140
Posted By cs_novice
Thanks...I now understand this a lot better!!...
Thanks...I now understand this a lot better!! These are all logic statements...it is either true or false!!
will keep updating as I get better at this.
csn
4,140
Posted By cs_novice
Thanks every one :b: (Danmero, Bartus11, Pravin27...
Thanks every one :b: (Danmero, Bartus11, Pravin27 (the Awk folks)!!! Kurumi (Ruby Wrangler!!) ygemici (Sed-lovers) !!...

@Danmero, although my problem is solved I am intrigued that your code...
4,494
Posted By cs_novice
Hi Try these: to replace tabs with spaces (1...
Hi
Try these:
to replace tabs with spaces (1 tab = 4 spaces)
perl -pi.bak -e "s/\t/ /g" infile
here: 1 tab = 'xxxx'
perl -pi.bak -e "s/\t/xxxx/g" infilehope this helps
csn
4,140
Posted By cs_novice
Hi bartus I am posting the first 10 lines of...
Hi bartus
I am posting the first 10 lines of the two files as under:
Gene_Pval.txt
Transc_ID DP Pval.cross
ID=GRMZM2G015073_T01 23.6044288292005 0.0206790394438121...
4,140
Posted By cs_novice
Hi I work on a Linux multi cluster (Red Hat...
Hi I work on a Linux multi cluster (Red Hat latest version) through Secure Shell logging from my PC at home. I will try this out on a mac and let you know.

csn

---------- Post updated 10-03-10...
4,140
Posted By cs_novice
Hi Bartus Yes I tried the command you suggested...
Hi Bartus
Yes I tried the command you suggested join Pval.txt Freq.txt and I get:

Frequency
2900 0.004
6000 0.007
7700 0.12
6600 0.05
7000 0.99
4,140
Posted By cs_novice
Hi Bartus I do not want to join the files. I...
Hi Bartus
I do not want to join the files. I edited my post to make my question clearer.

thanks
Siva
4,140
Posted By cs_novice
Column comparison between two files: moved from another post
I have two files as follows:
Pval.txt
ID Pvalue
91500 0.004
91700 0.007
91800 0.12
91900 0.05
92000 0.99

Freq.txt
ID Frequency
90000 56
91500 29
91600 78...
26,097
Posted By cs_novice
Hi Pravin27 I have asked the same query in a...
Hi Pravin27
I have asked the same query in a new post. danmero's awk and shell scripts are not giving me the right output. Please check the new post.

thanks
CSN
26,097
Posted By cs_novice
deleted as I have moved it to a new post CSN
deleted as I have moved it to a new post

CSN
1,615
Posted By cs_novice
Thanks every one, I will get back with feedback...
Thanks every one, I will get back with feedback and more questions soon

csn
1,615
Posted By cs_novice
Help with text/number parsing
Hello
I have a file that contains 10 rows as below:

"ID" "DP"
"ID=GRMZM2G015073_T01" "23.6044288292005"
"ID=GRMZM2G119852_T01" "59.7782287606723"
"ID=GRMZM2G100242_T02" ...
13,742
Posted By cs_novice
Hello Thanks, I am reading up a bit on regular...
Hello
Thanks, I am reading up a bit on regular expressions and patterns. Hope to get better in this.

Siva
13,742
Posted By cs_novice
find and replace in first column
Dear All
I need help with find and replacing a string:..

In the following example of a file named say <filename.gff> with 9 columns
1 ensembl chromosome 1 300239041 . ...
Showing results 1 to 22 of 22

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