Sponsored Content
Top Forums Shell Programming and Scripting top 10 highest and lowest percentile from a column Post 302641867 by joeyg on Wednesday 16th of May 2012 03:14:17 PM
Old 05-16-2012
Take a look at the following post

I looked for the:
bottom of top 5 (since 10 seemed weird with only 10 records)
top 1

Code:
$ sort -k2n <sample9.txt | head -5 | tail -1
JAY   5

$ sort -k2n <sample9.txt | head -1
JOE   1

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl ? - How to find and print the lowest and highest numbers punched in by the user?

. . . . . . (3 Replies)
Discussion started by: some124one
3 Replies

2. UNIX for Dummies Questions & Answers

Printing highest value from one column

Hi, I have a file that looks like this: s6 98 s6 91 s6 56 s5 32 s5 10 s5 4 So what I want to do is print only the highest value for each value in the column: So the file will look like this: s6 98 s5 32 Thanks (4 Replies)
Discussion started by: phil_heath
4 Replies

3. UNIX for Dummies Questions & Answers

Print line with highest value from one column

Hi everyone, This is my first post, but I have already received a lot of help from the forums in the past. Thanks! I've searched the forums and my question is very similar to an earlier post entitled "Printing highest value from one column", which I am apparently not yet allowed to post a... (1 Reply)
Discussion started by: dliving3
1 Replies

4. UNIX for Dummies Questions & Answers

Print line with highest value from one column

Hi everyone, This is my first post, but I have already received a lot of help from the forums in the past. Thanks! I've searched the forums and my question is very similar to an earlier post entitled "Printing highest value from one column", which I am apparently not yet allowed to post a... (3 Replies)
Discussion started by: dliving3
3 Replies

5. Shell Programming and Scripting

Selecting lowest and highest values in columns 1 and 2, based on subsets in column 3

Hi, I have a file with the following columns: 361459 447394 CHL1 290282 290282 CHL1 361459 447394 CHL1 361459 447394 CHL1 178352861 178363529 AGA 178352861 178363529 AGA 178363657 178363657 AGA Essentially, using CHL1 as an example. For any line that has CHL1 in... (2 Replies)
Discussion started by: hubleo
2 Replies

6. Shell Programming and Scripting

Find lines with matching column 1 value, retain only the one with highest value in column 2

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)
Discussion started by: pathunkathunk
3 Replies

7. UNIX for Dummies Questions & Answers

Awk, highest and lowest value of a column

Hi again! I am still impressed how fast I get a solution for my topic "average specific column value awk" yesterday. The associative arrays in awk work fine for me! But now I have another question for the same project. Now I have a list like this 1 -0.1 1 0 1 0.1 2 0 2 0.2 2 -0.2 How... (10 Replies)
Discussion started by: bjoern456
10 Replies

8. Shell Programming and Scripting

Sort from highest to lowest number

Hi Guys, I am looking for a way to sort the output below from the "Inuse" count from Highest to Lowest. Is it possible? Thanks in advance. user1 0.12 0.06 0 0.12 User Inuse Pin Pgsp Virtual Unit:... (4 Replies)
Discussion started by: jaapar
4 Replies

9. Shell Programming and Scripting

Calculate 5th percentile based on another column

I would like to have some help in calculating 5th percentile value of column 2 for each site, the input is like below:site val1 val2 002 10 25.3 002 20 25.3 002 30 25.3 002 40 20 002 50 20 002 60 20 002 70 20 002 80 30 002 90 30 002 100 30 002 120 30 003 20 30.3 003 20 30.3 003 30 20... (2 Replies)
Discussion started by: wuhuai
2 Replies

10. AIX

Print whole line with highest value from one column

Hi, I have a little issue right now. I have a file with 4 columns test0000002,10030010330,c_,218 test0000002,10030010330,d_,202 test0000002,10030010330,b_,193 test0000002,10030010020,c_,178 test0000002,10030010020,b_,170 test0000002,10030010330,a_,166 test0000002,10030010020,a_,151... (2 Replies)
Discussion started by: Ebk
2 Replies
GLFRUSTUM(3G)							   OpenGL Manual						     GLFRUSTUM(3G)

NAME
glFrustum - multiply the current matrix by a perspective matrix C SPECIFICATION
void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble nearVal, GLdouble farVal); PARAMETERS
left, right Specify the coordinates for the left and right vertical clipping planes. bottom, top Specify the coordinates for the bottom and top horizontal clipping planes. nearVal, farVal Specify the distances to the near and far depth clipping planes. Both distances must be positive. DESCRIPTION
glFrustum describes a perspective matrix that produces a perspective projection. The current matrix (see glMatrixMode()) is multiplied by this matrix and the result replaces the current matrix, as if glMultMatrix() were called with the following matrix as its argument: 2 nearVal right - left 0 A 0 0 2 nearVal top - bottom B 0 0 0 C D 0 0 -1 0 A = right + left right - left B = top + bottom top - bottom C = - farVal + nearVal farVal - nearVal D = - 2 farVal nearVal farVal - nearVal Typically, the matrix mode is GL_PROJECTION, and left bottom - nearVal and right top - nearVal specify the points on the near clipping plane that are mapped to the lower left and upper right corners of the window, assuming that the eye is located at (0, 0, 0). - farVal specifies the location of the far clipping plane. Both nearVal and farVal must be positive. Use glPushMatrix() and glPopMatrix() to save and restore the current matrix stack. NOTES
Depth buffer precision is affected by the values specified for nearVal and farVal. The greater the ratio of farVal to nearVal is, the less effective the depth buffer will be at distinguishing between surfaces that are near each other. If r = farVal nearVal roughly log 2 r bits of depth buffer precision are lost. Because r approaches infinity as nearVal approaches 0, nearVal must never be set to 0. ERRORS
GL_INVALID_VALUE is generated if nearVal or farVal is not positive, or if left = right, or bottom = top, or near = far. GL_INVALID_OPERATION is generated if glFrustum is executed between the execution of glBegin() and the corresponding execution of glEnd(). ASSOCIATED GETS
glGet() with argument GL_MATRIX_MODE glGet() with argument GL_MODELVIEW_MATRIX glGet() with argument GL_PROJECTION_MATRIX glGet() with argument GL_TEXTURE_MATRIX glGet() with argument GL_COLOR_MATRIX SEE ALSO
glOrtho(), glMatrixMode(), glMultMatrix(), glPushMatrix(), glViewport() COPYRIGHT
Copyright (C) 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/. AUTHORS
opengl.org opengl.org 06/10/2014 GLFRUSTUM(3G)
All times are GMT -4. The time now is 11:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy