Sorry for pasting the data as text file. I will copy and paste them in code tags hereafter.
I tried the awk one liner. It gets me only the first line of the output and does not show the second one in output.
I am also expecting second one also as output
Thank You,
Balaji
Hi. How do I find an expression with awk in only one column, and if it fits, then print that whole column.
1 apple oranges
2 bannanas pears
3 cats dogs
4 hesaid shesaid
echo "which number:"
read NUMBER (user inputs number 2 for this example)
awk " /$NUMBER/ {field to search is field... (2 Replies)
I have a data file with two columns,
for the second column I want to find the minimum,
and subtract this minimum from each value in the second column,
how to realize this using C shell
For example, I have
1 -2.4
2 -4.8
3 7.9
I wanna output
1 2.4
2 0
3 12.7
Thanks! (4 Replies)
Hi,
I have a wide and long dataset which looks as follows:
0 3 4 2 3 0 2 2 ...
3 2 4 0 2 2 2 3 ...
0 3 4 2 0 4 4 4 ...
3 0 4 2 2 4 2 4 ...
....
I would like to obtain the minimum of each column (ignoring zero values) so the output would look like:
3 2 4 2 2 2 2 2
I have the... (3 Replies)
I have a file like:
I would like to find lines lines with duplicate values in column 1, and retain only one based on two conditions: 1) keep line with highest value in column 3, 2) if column 3 values are equal, retain the line with the highest value in column 4.
Desired output:
I was able to... (3 Replies)
hi all,
i want to get the most comon column w.r.t another
this is my file
Tom|london
Tom|london
Tom|Paris
Adam|Madrid
Adam|NY
the Output to get me :
Tom|london
Adamn|Madrid
ive tried (10 Replies)
Hello,
I need to find out the minimum and maximum values based on specific column, and then print out the entire row with the max value.
Infile.txt:
scf6 290173 290416 . + X_047241 T_00113118-1
scf6 290491 290957 . + X_047241 T_00113118-2
scf6 290898 290957 . + X_047241 T_00113119-3
scf6... (2 Replies)
Need your support for below. Please help to get required output
If column 5 is INV then only consider column1 and take out duplicates/identical rows/values from column1 and then put minimum value of column6 in column7 and put maximum value in column 8 and then need to do subtract values of... (7 Replies)