03-27-2017
Quote:
Originally Posted by
RudiC
That little script is taking advantage of some of awk's idiosyncrasies / default behaviour. It creates a 24 element array B by splitting the given string using the (default if ommitted: scriptwide) field separator (here: set to ","). In the print statement, the index is calculated by interpreting $2's (timestamp) contents up to the first non-digit char (":") as a number (default behaviour), and adding 1, mapping e.g. 00:xx:xx to index 1.
hi, im trying hard to understand why did you use a 24 element array; on what basis have you formulated the array; what basis are you calculating the index value and then printing it out as the different CUTs, but unfortunately I m not able to understand. Can you please advise?
7 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
I am new to unix programming. I am trying for a requirement and the requirement goes like this.....
I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
Discussion started by: mailsara
2 Replies
2. Programming
I need to return all records in a file starting with
a row that says
TABLE: <tabl name>
lists of hexadecimal records
TABLE: <some table>
TABLe is a key word in the file. I know the name of the table I want to start with. I do not know the name of the table that I will end with. I just... (4 Replies)
Discussion started by: guessingo
4 Replies
3. Shell Programming and Scripting
Hi Friends,
I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only
I can get the... (12 Replies)
Discussion started by: srkmish
12 Replies
4. Shell Programming and Scripting
Hello ,
I am working on AIX. I have to convert Unix timestamp to normal timestamp. Below is the file. The Unix timestamp will always be preceded by
EFFECTIVE_TIME as first field as shown and there could be multiple EFFECTIVE_TIME in the file : 3.txt
Contents of... (6 Replies)
Discussion started by: rahul2662
6 Replies
5. IP Networking
Hi All,
I'm a bit confused about assigning IP address from IP Ranges.
I am using this scenario below to understand.
Scenario
Adatum.com an international IT solutions company, is launching 12 new branches in a new country where they currently have no existing branches. The sWin CIO has asked... (3 Replies)
Discussion started by: TryllZ
3 Replies
6. Homework & Coursework Questions
THIS IS A SAMPLE PRACTICAL EXAM QUESTION, COMPLETE FILE HAS BEEN ATTACHED AS WELL.
Hi All,
I'm a bit confused about assigning IP address from IP Ranges.
I am using this scenario below to understand.
Scenario
Adatum.com an international IT solutions company, is launching 12 new branches in a... (10 Replies)
Discussion started by: TryllZ
10 Replies
7. Shell Programming and Scripting
So basically I have a log file and each line in this log file starts with a timestamp:
MON DD HH:MM:SS
SEP 15 07:30:01
I need to grep all the lines between last hour timestamp and current timestamp. Then these lines will be moved to a tmp file from which I will grep for particular strings. ... (1 Reply)
Discussion started by: nms
1 Replies
LEARN ABOUT MOJAVE
glprimitiverestartindex
GLPRIMITIVERESTARTIN(3G) OpenGL 3.3 GLPRIMITIVERESTARTIN(3G)
NAME
glPrimitiveRestartIndex - specify the primitive restart index
C SPECIFICATION
void glPrimitiveRestartIndex(GLuint index);
PARAMETERS
index
Specifies the value to be interpreted as the primitive restart index.
DESCRIPTION
glPrimitiveRestartIndex specifies a vertex array element that is treated specially when primitive restarting is enabled. This is known as
the primitive restart index.
When one of the Draw* commands transfers a set of generic attribute array elements to the GL, if the index within the vertex arrays
corresponding to that set is equal to the primitive restart index, then the GL does not process those elements as a vertex. Instead, it is
as if the drawing command ended with the immediately preceding transfer, and another drawing command is immediately started with the same
parameters, but only transferring the immediately following element through the end of the originally specified elements.
When either glDrawElementsBaseVertex(), glDrawElementsInstancedBaseVertex() or glMultiDrawElementsBaseVertex() is used, the primitive
restart comparison occurs before the basevertex offset is added to the array index.
NOTES
glPrimitiveRestartIndex is available only if the GL version is 3.1 or greater.
SEE ALSO
glDrawArrays(), glDrawElements(), glDrawElementsBaseVertex(), glDrawElementsInstancedBaseVertex()
COPYRIGHT
Copyright (C) 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication
License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
OpenGL 3.3 03/08/2011 GLPRIMITIVERESTARTIN(3G)