Sponsored Content
Full Discussion: Array question
Top Forums Shell Programming and Scripting Array question Post 302088286 by ahtat99 on Monday 11th of September 2006 08:15:38 AM
Old 09-11-2006
Well, figured it out. There are no push/pop for array in UNIX KSH. What I had done is that I cat the server names to a file and use sed to do my job, and then append those server name back to the array again. Hope this trick would help other when they want to do push/pop with an array.
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Storage array question

We just purchased a MOD30 disk array strage system. We have 15 drives and 2 hot spares. We're running a database app with 8 data sets. I'm trying to get the best i/o speed out of my disk configuration. Right now I have 3 raid5 arrays setup. This seems to offer the same performance as having the... (1 Reply)
Discussion started by: ncmurf00
1 Replies

2. UNIX for Dummies Questions & Answers

Array question

When setting a variable, how would I go about making each result a new line? A very simple example would be: theFolders=`(ls -l /)` echo $theFolders This gives me all the folders as one variable and I need to be able to use each as its own variable. I'm sure I have to make this into an... (2 Replies)
Discussion started by: TheCrunge
2 Replies

3. Shell Programming and Scripting

perl array question from going through hash

suppose my @{$data1{$callid}}; cotains one two three three five six one two three of random patterns but each item is separated by white space or tab, Below code extract and get rid of the whitespace perfectly so that it shows now like this onetwothree threefivesix... (2 Replies)
Discussion started by: hankooknara
2 Replies

4. Shell Programming and Scripting

Variable Sized Array Length Question

I need to implement the following logic and need some expert help from UNIX community. These are the steps in my Shell script. 1. Analyze a file. 2. Extract all the ID's in that file. 3. Use the ID's from #2 to run another filter on the file. I've implemented # 1 and 2 using... (3 Replies)
Discussion started by: katwala
3 Replies

5. Shell Programming and Scripting

Help! Yet another check element in array Question

Greetings, DISCLAIMER: My shell scripting is rusty so my question may be borderline stupid. You've been warned. I need to create a script that a) lists the content of zip files in a directory and b) sends out an `exception` report. My ZIP files contain a control file (for load check). I want... (2 Replies)
Discussion started by: alan
2 Replies

6. Programming

array question

Im new to C programming and am having trouble understanding the output of this code int array={4,5,8,9,8,1,0,1,9,3}; int *array_ptr; int main() { array_ptr=array; while((*array_ptr) != 0) array_ptr++;; printf("%d\n", array_ptr - array); return(0); } the output is 6 but I... (2 Replies)
Discussion started by: sacat
2 Replies

7. UNIX for Dummies Questions & Answers

Array question

I have attempted to create an array consisting of two items: #0 and #1. I am able to print the two items corrctly: arr=(hello "my name is") echo ${arr} hello echo ${arr} my name is However, when I try to run a for loop to print both objects: for i in ${arr } do echo $i done I get:... (2 Replies)
Discussion started by: locoroco
2 Replies

8. Shell Programming and Scripting

Question on iterating array elements

Hi, I am trying to do something similar to the for loop example from KSH For Loop Array: Iterate Through Array Values $: cat y.ksh #!/bin/ksh # set array called nameservers set -A nameservers 192.168.1.1 192.168.1.5 202.54.1.5 # print all name servers for i in ${nameservers} do ... (3 Replies)
Discussion started by: newbie_01
3 Replies

9. Shell Programming and Scripting

Zsh array -a vs. -A question

Inside a zsh function, I create a local array with local -a arrayname and a local associative array with local -A arrayname. I also can create an array using set, like this: set -A arrayname value1 value2 value3In this form, I can not explicitly declare that an array is associative or... (2 Replies)
Discussion started by: rovf
2 Replies

10. Shell Programming and Scripting

Associative array index question

I am trying to assign indexes to an associative array in a for loop but I have to use an eval command to make it work, this doesn't seem correct I don't have to do this with regular arrays For example, the following assignment fails without the eval command: #! /bin/bash read -d "\0" -a... (19 Replies)
Discussion started by: Riker1204
19 Replies
GLPUSHCLIENTATTRIB(3G)													    GLPUSHCLIENTATTRIB(3G)

NAME
glPushClientAttrib, glPopClientAttrib - push and pop the client attribute stack C SPECIFICATION
void glPushClientAttrib( GLbitfield mask ) PARAMETERS
mask Specifies a mask that indicates which attributes to save. Values for mask are listed below. C SPECIFICATION
void glPopClientAttrib( void ) DESCRIPTION
glPushClientAttrib takes one argument, a mask that indicates which groups of client-state variables to save on the client attribute stack. Symbolic constants are used to set bits in the mask. mask is typically constructed by OR'ing several of these constants together. The special mask GL_CLIENT_ALL_ATTRIB_BITS can be used to save all stackable client state. The symbolic mask constants and their associated GL client state are as follows (the second column lists which attributes are saved): GL_CLIENT_PIXEL_STORE_BIT Pixel storage modes GL_CLIENT_VERTEX_ARRAY_BIT Vertex arrays (and enables) glPopClientAttrib restores the values of the client-state variables saved with the last glPushClientAttrib. Those not saved are left unchanged. It is an error to push attributes onto a full client attribute stack, or to pop attributes off an empty stack. In either case, the error flag is set, and no other change is made to GL state. Initially, the client attribute stack is empty. NOTES
glPushClientAttrib is available only if the GL version is 1.1 or greater. Not all values for GL client state can be saved on the attribute stack. For example, select and feedback state cannot be saved. The depth of the attribute stack depends on the implementation, but it must be at least 16. Use glPushAttrib and glPopAttrib to push and restore state which is kept on the server. Only pixel storage modes and vertex array state may be pushed and popped with glPushClientAttrib and glPopClientAttrib. When the GL_ARB_multitexture extension is supported, pushing and popping client vertex array state apples to all supported texture units, and the active client texture state. ERRORS
GL_STACK_OVERFLOW is generated if glPushClientAttrib is called while the attribute stack is full. GL_STACK_UNDERFLOW is generated if glPopClientAttrib is called while the attribute stack is empty. ASSOCIATED GETS
glGet with argument GL_ATTRIB_STACK_DEPTH glGet with argument GL_MAX_CLIENT_ATTRIB_STACK_DEPTH SEE ALSO
glColorPointer, glDisableClientState, glEdgeFlagPointer, glEnableClientState, glGet, glGetError, glIndexPointer, glNormalPointer, glNewList, glPixelStore, glPushAttrib, glTexCoordPointer, glVertexPointer GLPUSHCLIENTATTRIB(3G)
All times are GMT -4. The time now is 08:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy