Search Results

Search: Posts Made By: Banni
5,788
Posted By Banni
Sort after 2. column in array in Perl
Hey

How do I sort an array numerically after the second column?
My values are integers like 1, 2, 3, 4... and they are not unique, so I can't just reverse my hash and sort by keys.
I wanna...
5,624
Posted By Banni
Extracting lines present in one file but missing in another using Perl
Hey
I have an input file containing a list of numbers like:
U01120.CDS.1
D25328.CDS.1
X15573.CDS.1
K03515.CDS.1
L44140.CDS.10
U24183.CDS.1
M97347.CDS.1
U05259.CDS.1
And another input file...
2,603
Posted By Banni
Problems with Alt Gr in Perl scripts
Hey

I am new to programming in general but am trying to work in Perl.
The thing is that almost every time I write a script (I use nedit) I get problems with Alt Gr.

E.g. In stead of } I get...
3,902
Posted By Banni
Thanks a million! Very clear explanation so now I...
Thanks a million! Very clear explanation so now I actually learned something new and useful. :)
3,902
Posted By Banni
Oki cool thanx. It worked as intended. ...
Oki cool thanx.

It worked as intended.
But now I'm going to be really annoying since, yes I'm a total newbie. But I like to understand what the code I use actually does, since then it's a lot...
3,902
Posted By Banni
Hey again I tried looking up stripping both...
Hey again

I tried looking up stripping both in the Perl manual and on Google, but didn't really understand how to use that information.

I found something like this:

for ($string) {
...
3,902
Posted By Banni
Integers/floating points in Perl
Hi all

I am trying to figure out how to specify integers and floating points specifically in a Perl program.

Basically the idea is that I want the user to input an integer and then dependent...
2,414
Posted By Banni
Ahh cool that was easy! But why doesn't it...
Ahh cool that was easy!

But why doesn't it work with a loop like:

foreach num (1 2 3)
foreach? paste Eu9_10.2patienter/pospep_10.2patient$num > test
end

Your way is much easier - I...
2,414
Posted By Banni
I'm a total newbie! What do you mean by...
I'm a total newbie!

What do you mean by "real pattern"?
2,414
Posted By Banni
100 $1's to new tab delimited file
Hi

I have 100 files each with only one column of 10 numbers that I wish to add to a new file so that I get 100 columns collected in one tab delimited file.
I tried something like:

foreach...
18,240
Posted By Banni
Thanks a lot for the help, radoulov, and the...
Thanks a lot for the help, radoulov, and the clear explanations. :b:
Am definitely going to post some questions here again sometime. :)
18,240
Posted By Banni
How cool was that!! It worked! Thanks! Used...
How cool was that!! It worked! Thanks!

Used this command:

gawk -F'\t' '{$8=$4;$4=_ }1' OFS='\t' myfile > Newfile

And got the desired output which my program reads as it should:
A*0201 ...
18,240
Posted By Banni
See here's the problem with being a total newbie...
See here's the problem with being a total newbie - don't know what defines the fieldseperator.
I just now that the ^| indicates tabs and the $ is the end-of-line-indicator or something like that....
18,240
Posted By Banni
This is the input file where the current column 4...
This is the input file where the current column 4 needs to become column 8:

cat -vet Nordirland_alleler.tab.txt | head

A*0201^IIreland Northern^I46.8^I0.274^I^I^I^I^I$
A*0101^IIreland...
18,240
Posted By Banni
Adding EMPTY columns to Tab-delimited txt file
Hi

I have a txt file with 4 columns where I need to add 4 empty columns in the middle meaning that I need what is currently column 4 to be column 8 in a new file.

The idea is that I have to...
Showing results 1 to 15 of 15

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