01-19-2018
You're close. Did you consider deploying arrays?
Will negative values be present in field (COL) 2?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
I have a file that contains a list of codes (shown below).
I want to 'uniq' the file using only the first field. Anyone know an easy way of doing it?
Cheers,
Dave
##### Input File #####
1xr1 1xws 1yxt 1yxu 1yxv 1yxx 2o3p 2o63 2o64 2o65
1xr1 1xws 1yxt 1yxv 1yxx 2o3p 2o63 2o64... (8 Replies)
Discussion started by: Digby
8 Replies
2. UNIX for Dummies Questions & Answers
Hi ;
I have a question regarding the uniq command in unix
How do I uniq 3rd field in a file ?
original file :
zoom coord 39 18652 39 18652
zoom coord 39 18653 39 18653
zoom coord 39 18818 39 18818
zoom coord 39 18840 39 18840
zoom coord 41 15096 41 15096
zoom... (1 Reply)
Discussion started by: babycakes
1 Replies
3. Shell Programming and Scripting
Hi,
I have this scenario; where there are two classes:- apple and orange.
1,2,3,4,5,6,apple
1,1,0,4,2,3,apple
1,3,3,3,3,4,apple
1,1,1,1,1,1,orange
1,2,3,1,1,1,orange
Basically for apple, i have 3 entries in the file, and for orange, I have 2 entries. Im trying to edit the file and find... (5 Replies)
Discussion started by: ahjiefreak
5 Replies
4. Shell Programming and Scripting
How can I use uniq on a certain field or what else could I use? If I want to use uniq on the second field and the output would remove one of the lines with a 5.
bob 5 hand
jane 3 leg
jon 4 head
chris 5 lungs (1 Reply)
Discussion started by: Bandit390
1 Replies
5. Shell Programming and Scripting
Hello all,
this should really be easy for you... I need AWK to print column maxima for each column of such input:
Input:
1 2 3 1
2 1 1 3
2 1 1 2
Output should be:
2 2 3 3
This does the sum, but i need max instead:
{ for(i=1; i<=NF; i++)
sum +=$i }
END {for(i=1; i in sum;... (3 Replies)
Discussion started by: irrevocabile
3 Replies
6. Shell Programming and Scripting
I met a challenge to filter ~70 millions of sequence rows and I want using awk with conditions:
1) longest string of each pattern in column 2, ignore any sub-string, as the index;
2) all the unique patterns after 1);
3) print the whole row;
input:
1 ABCDEFGHI longest_sequence1
2 ABCDEFGH... (12 Replies)
Discussion started by: yifangt
12 Replies
7. Shell Programming and Scripting
I have a flatfile A.txt
2012/12/04 14:06:07 |trees|Boards 2, 3|denver|mekong|mekong12
2012/12/04 17:07:22 |trees|Boards 2, 3|denver|mekong|mekong12
2012/12/04 17:13:27 |trees|Boards 2, 3|denver|mekong|mekong12
2012/12/04 14:07:39 |rain|Boards 1|tampa|merced|merced11
How do i sort and get... (3 Replies)
Discussion started by: sabercats
3 Replies
8. Shell Programming and Scripting
Hi All,
I am searching for a script which will produce an output file with the uniq first field with the second field having highest value among all the duplicates..
The output file will produce only the uniqs which are duplicate 3 times..
Input file
X 9
B 5
A 1
Z 9
T 4
C 9
A 4... (13 Replies)
Discussion started by: ailnilanjan
13 Replies
9. Shell Programming and Scripting
so this is what i want to do. i have data that looks like this:
DATA:
Array: A
Interface Type: SAS
Unused Space: 0 MB
Status: Failed
Logical Drive: 2
Size: 279.4 GB
Fault Tolerance: RAID 1
Heads: 255
Sectors Per Track: 32... (2 Replies)
Discussion started by: SkySmart
2 Replies
10. Shell Programming and Scripting
I want to bring values in the second column into single line for uniq value in the first column.
My input
jvm01, Web 2.0 Feature Pack Library
jvm01, IBM WebSphere JAX-RS
jvm01, Custom01 Shared Library
jvm02, Web 2.0 Feature Pack Library
jvm02, IBM WebSphere JAX-RS
jvm03, Web 2.0 Feature... (10 Replies)
Discussion started by: kchinnam
10 Replies
LEARN ABOUT XFREE86
glinterleavedarrays
GLINTERLEAVEDARRAYS(3G) GLINTERLEAVEDARRAYS(3G)
NAME
glInterleavedArrays - simultaneously specify and enable several interleaved arrays
C SPECIFICATION
void glInterleavedArrays( GLenum format,
GLsizei stride,
const GLvoid *pointer )
PARAMETERS
format Specifies the type of array to enable. Symbolic constants GL_V2F, GL_V3F, GL_C4UB_V2F, GL_C4UB_V3F, GL_C3F_V3F, GL_N3F_V3F,
GL_C4F_N3F_V3F, GL_T2F_V3F, GL_T4F_V4F, GL_T2F_C4UB_V3F, GL_T2F_C3F_V3F, GL_T2F_N3F_V3F, GL_T2F_C4F_N3F_V3F, and
GL_T4F_C4F_N3F_V4F are accepted.
stride Specifies the offset in bytes between each aggregate array element.
DESCRIPTION
glInterleavedArrays lets you specify and enable individual color, normal, texture and vertex arrays whose elements are part of a larger
aggregate array element. For some implementations, this is more efficient than specifying the arrays separately.
If stride is 0, the aggregate elements are stored consecutively. Otherwise, stride bytes occur between the beginning of one aggregate
array element and the beginning of the next aggregate array element.
format serves as a ``key'' describing the extraction of individual arrays from the aggregate array. If format contains a T, then texture
coordinates are extracted from the interleaved array. If C is present, color values are extracted. If N is present, normal coordinates are
extracted. Vertex coordinates are always extracted.
The digits 2, 3, and 4 denote how many values are extracted. F indicates that values are extracted as floating-point values. Colors may
also be extracted as 4 unsigned bytes if 4UB follows the C. If a color is extracted as 4 unsigned bytes, the vertex array element which
follows is located at the first possible floating-point aligned address.
NOTES
glInterleavedArrays is available only if the GL version is 1.1 or greater.
If glInterleavedArrays is called while compiling a display list, it is not compiled into the list, and it is executed immediately.
Execution of glInterleavedArrays is not allowed between the execution of glBegin and the corresponding execution of glEnd, but an error may
or may not be generated. If no error is generated, the operation is undefined.
glInterleavedArrays is typically implemented on the client side.
Vertex array parameters are client-side state and are therefore not saved or restored by glPushAttrib and glPopAttrib. Use
glPushClientAttrib and glPopClientAttrib instead.
When the GL_ARB_multitexture extension is supported, glInterleavedArrays only updates the texture coordinate array for the active active
texture unit. The texture coordinate state for other client texture units is not update, regardless if they are enabled or not.
ERRORS
GL_INVALID_ENUM is generated if format is not an accepted value.
GL_INVALID_VALUE is generated if stride is negative.
SEE ALSO
glArrayElement(3G), glClientActiveTextureARB(3G), glColorPointer(3G), glDrawArrays(3G), glDrawElements(3G), glEdgeFlagPointer(3G),
glEnableClientState(3G), glGetPointer(3G), glIndexPointer(3G), glNormalPointer(3G), glTexCoordPointer(3G), glVertexPointer(3G)
GLINTERLEAVEDARRAYS(3G)