And i need to print the line with the maximum value in last column but if the value is the same (2 in this exemple for the 3 last lines) i need get the line with the minimum value in column 2.
So the output should be:
Quote:
cluster 7 ligands 2
I already can get the line based in the maximum value of last column with this awk:
That give me this:
Quote:
cluster 9 ligands 2
But now i don't know how to get the "cluster 7 ligands 2" and not the "cluster 9 ligands 2". I was thinking in get the minimum value in 2 column in case of the maximum value repeats but i can't find how to do that
Hello every one, I have following data
***CAMPAIGN 1998 CONTRIBUTIONS***
---------------------------------------------------------------------------
NAME PHONE Jan | Feb | Mar | Total Donated
... (12 Replies)
hi, i have an awk script and I managed to figure out how to search the max value but Im having difficulty in searching for the min field value.
BEGIN {FS=","; max=0}
NF == 7 {if (max < $6) max = $6;}
END { print man, min}
where $6 is the column of a field separated by a comma (3 Replies)
Hi guys!
I'm new to scripting and I need to write a script in awk.
Here is example of file on which I'm working
ATOM 4688 HG1 PRO A 322 18.080 59.680 137.020 1.00 0.00
ATOM 4689 HG2 PRO A 322 18.850 61.220 137.010 1.00 0.00
ATOM 4690 CD ... (18 Replies)
Is it possible to print max number of 2 columns - awk
note: print max if the integer is positive and print min if the integer is negative
input
a 1 2
b 3 4
c 5 1
d -3 -5
d -5 -3
output
a 2
b 4
c 5
d -5
d -5 (4 Replies)
Hi,
I need your kind help to get min and max values from file based on value in $5 .
File1
SP12.3 stc 2240806 2240808 + ID1_N003 ID2_N003T0
SP12.3 sto 2241682 2241684 + ID1_N003 ID2_N003T0
SP12.3 XE 2239943 2240011 + ID1_N003 ID2_N003T0
SP12.3 XE 2240077 2241254 + ID1_N003 ... (12 Replies)
Hi to all,
Please help on the following problem, I'm not where to begin, if awk or shell script.
I have pairs of ranges of numbers and I need to find the root or roots of ranges based on min Range and Max ranges
Example #1:
If min range is 120000 and max ranges 124999, it means that are... (5 Replies)
I am using the following script to search for and print minimum values for each individual Fields (3-14) for each unique id (Field 1). But when the field contains a "-99.99" ( I am ignoring "-99.99") and when the minimum value is the first line of a new id (Field 1), the output does not print Field... (13 Replies)
Discussion started by: ncwxpanther
13 Replies
LEARN ABOUT OPENSOLARIS
clinfo
clinfo(1M) System Administration Commands clinfo(1M)NAME
clinfo - display cluster information
SYNOPSIS
clinfo [-nh]
DESCRIPTION
The clinfo command displays cluster configuration information about the node from which the command is executed.
Without arguments, clinfo returns an exit status of 0 if the node is configured and booted as part of a cluster. Otherwise, clinfo returns
an exit status of 1.
OPTIONS
The following options are supported:
-h Displays the highest node number allowed to be configured. This is different from the maximum number of nodes supported in a given
cluster. The current highest configured node number can change immediately after the command returns since new nodes can be dynami-
cally added to a running cluster.
For example, clinfo -h might return 64, meaning that the highest number you can use to identify a node is 64. See the Sun Cluster 3.0
System Administration Guide for a description of utilities you can use to determine the number of nodes in a cluster.
-n Prints the number of the node from which clinfo is executed.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
1 An error occurred.
This is usually because the node is not configured or booted as part of a cluster.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO attributes(5)SunOS 5.11 12 Mar 2002 clinfo(1M)