Search Results

Search: Posts Made By: ksennin
1,037
Posted By ksennin
Many thanks Scott. This is exactly what I needed....
Many thanks Scott. This is exactly what I needed. I didn't know about "?", I'll look it up!
Best,
KS
1,037
Posted By ksennin
Using awk to assign binary values to data above/below a certain threshold?
Hello,

I have files containing a large amount of values in columns, and I want to simplify the data by making the values binary, i.e. assigning 1/0 for each value above or below a certain...
5,631
Posted By ksennin
Thank you very much to both for helpful replies
Thank you very much to both for helpful replies
5,631
Posted By ksennin
Combining certain columns of multiple files into one file
Hello Unix gurus,

I have a large number of files (say X) each containing two columns of data and the same number of rows.

I would like to combine these files to create a unique merged file...
15,928
Posted By ksennin
Thank you very much for the clarification!
Thank you very much for the clarification!
15,928
Posted By ksennin
Thank you for the kind word! It's a very slow...
Thank you for the kind word! It's a very slow process ;)



Do you just list the conditions as x:y:z with the last one being a bit like "else"?
Thanks again
15,928
Posted By ksennin
Sorry for the simplicity, I'm just starting! ;) ...
Sorry for the simplicity, I'm just starting! ;)
I didn't know how to combine them with "else if".

awk '{
if ($3 > $2)
print $1,"2";
else if($3 < $2)
print $1,"0";
else if ($3 = $2)
print...
15,928
Posted By ksennin
Thanks for your quick reply! Of course. So far...
Thanks for your quick reply!
Of course. So far I have:

awk '{
if ($3 > $2)
print $1,"2";
else
print $1,"0";
}' file1 > file2

but I am not sure how to deal with the case in which $3 and...
15,928
Posted By ksennin
Compare 2 columns from the same file and print a value depending on the result
Hello Unix gurus,

I have a file with this format (example values):

label1 1 0
label2 1 0
label3 0.4 0.6
label4 0.5 0.5
label5 0.1 0.9
label6 0.9 0.1

in which:
column 1 is a row label...
4,464
Posted By ksennin
Many thanks, it works perfectly!!!
Many thanks, it works perfectly!!!
4,464
Posted By ksennin
Thank you very much for your fast reply! I...
Thank you very much for your fast reply!

I tried and it seems that it doesn't work on my data: I just get calculations at the end of the output that don't really seem to make sense.

Could you...
4,464
Posted By ksennin
Using awk to get the maximum of a value in two different ranges
Dear Unix gurus,

I have sample data organised like this and containing 6 columns (with headers):

label c2 c3 c4 c5 c6

where c2 to c6 are numeric values in columns c2 to 6.

I am trying to...
Showing results 1 to 12 of 12

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