07-21-2010
count multiple objects in shell script
Hi all:
Trying to count the number of oracle instances on HPUX 11.23 - using ksh. I have multiple instances running and I would like to have a count for how many processes for each instance. Example, run the 'ps -efu oracle' command and for each instance increment a counter. So I am looking for
INT1=# INT2=# INT3=# ... INTn=#
I keep thinking a 'do-while' or some type of 'while' loop but I am missing something, somewhere...
Many thanks!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Guys,
I want to write a perl/shell script do parse the following file
input file content
NPA-NXX SC
2084549 45
2084552 45
2084563 2007
2084572 45
2084580 45
3278411 45
3278430 45
3278493 530
3278507 530... (3 Replies)
Discussion started by: pistachio
3 Replies
2. Shell Programming and Scripting
looking to replace parameters within a string with an external answer - with multiple replacements within a string %% will be used to wrap the objects to be replaced
i.e. hello %%title%% %%user%% from %%address%% you last %%action%% on %%object%%
the params will be used to make calls to a... (1 Reply)
Discussion started by: bidbrooken
1 Replies
3. Shell Programming and Scripting
Hello All,
I have come across a small problem. It would be great if any of you could help me in resolving the issue.
one file named dummy.txt will be ftped to Unix machine twice daily. If i receive it second time in a day i need to do some processing with the file.
How to find the... (2 Replies)
Discussion started by: RSC1985
2 Replies
4. Shell Programming and Scripting
I have a unix shell script (ex.sh) written.
How to find out how many users (incl. myself) have run this .sh ?
I can insert code snipet at top of script if need be.
- Ravi (2 Replies)
Discussion started by: ravi368
2 Replies
5. Shell Programming and Scripting
I am new to Shell scripting and below is my requirement.
I need to search some specific word e.g. "exception" or "transaction" from log file.
We have multiple env e.g. Level1 , Level2 etc and each env have Multiple boxes e.g. For Level 1 env we have "test11.test.com" , "test12.test.com".
Each... (1 Reply)
Discussion started by: peeyush
1 Replies
6. Linux
how to store the count of queries in variables inside a filein shell script
my output :
filename
-------
variable1=result from 1st query
variable2=result from 2nd query
.
.
.
. (3 Replies)
Discussion started by: sanvel
3 Replies
7. Shell Programming and Scripting
I have file listed in my directory in following format
-rwxrwxr-x+ 1 test test 4.9M Oct 3 16:06 test20141002150108.txt
-rwxrwxr-x+ 1 test test 4.9M Oct 4 16:06 test20141003150108.txt
-rwxrwxr-x+ 1 test test 4.9M Oct 5 16:06 test20141005150108.txt
-rwxrwxr-x+ 1 test ... (2 Replies)
Discussion started by: krish2014
2 Replies
8. Linux
Viewers Please help me to get out of the below issue.. Thanks in advance
Required shell script for Monitoring status of the objects and it should update the child objects status as well.
Requirements:-
1. We are working on IIB (IBM Integration Bus v10) and trying to implement the broker ('... (0 Replies)
Discussion started by: dsreddy447
0 Replies
9. Shell Programming and Scripting
I want to count the number of lines, I need this result be a number, and sum the last numeric column, I had done to make this one at time, but I need to make this for a crontab, so, it has to be an script, here is my lines:
It counts the number of lines:
egrep -i String file_name_201611* |... (5 Replies)
Discussion started by: Elly
5 Replies
10. Shell Programming and Scripting
Hi All ,
I have multiple pipe delimited csv files are present in a directory.I need to find out distinct count on a column on those files and need the total distinct
count on all files.
We can't merge all the files here as file size are huge in millions.I have tried in below way for each... (9 Replies)
Discussion started by: STCET22
9 Replies
LEARN ABOUT CENTOS
gldrawarraysinstancedbaseinstance
GLDRAWARRAYSINSTANCE(3G) OpenGL Manual GLDRAWARRAYSINSTANCE(3G)
NAME
glDrawArraysInstancedBaseInstance - draw multiple instances of a range of elements with offset applied to instanced attributes
C SPECIFICATION
void glDrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count, GLsizei primcount, GLuint baseinstance);
PARAMETERS
mode
Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP,
GL_TRIANGLE_FAN, GL_TRIANGLESGL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and
GL_PATCHES are accepted.
first
Specifies the starting index in the enabled arrays.
count
Specifies the number of indices to be rendered.
primcount
Specifies the number of instances of the specified range of indices to be rendered.
baseinstance
Specifies the base instance for use in fetching instanced vertex attributes.
DESCRIPTION
glDrawArraysInstancedBaseInstance behaves identically to glDrawArrays() except that primcount instances of the range of elements are
executed and the value of the internal counter instanceID advances for each iteration. instanceID is an internal 32-bit integer counter
that may be read by a vertex shader as gl_InstanceID.
glDrawArraysInstancedBaseInstance has the same effect as:
if ( mode or count is invalid )
generate appropriate error
else {
for (int i = 0; i < primcount ; i++) {
instanceID = i;
glDrawArrays(mode, first, count);
}
instanceID = 0;
}
Specific vertex attributes may be classified as instanced through the use of glVertexAttribDivisor(). Instanced vertex attributes supply
per-instance vertex data to the vertex shader. The index of the vertex fetched from the enabled instanced vertex attribute arrays is
calculated as: gl _ InstanceID divisor + baseInstance. Note that baseinstance does not affect the shader-visible value of gl_InstanceID.
ERRORS
GL_INVALID_ENUM is generated if mode is not one of the accepted values.
GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry
shader in the currently installed program object.
GL_INVALID_VALUE is generated if count or primcount are negative.
GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array and the buffer object's data store is
currently mapped.
SEE ALSO
glDrawArrays(), glDrawElementsInstanced()
COPYRIGHT
Copyright (C) 2011 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/.
AUTHORS
opengl.org
opengl.org 06/10/2014 GLDRAWARRAYSINSTANCE(3G)