hi folks
i am facing problom while trying to access sql variable as array index ina unix shell script....script goes as below..
#!/bin/ksh
MAX=3
for elem in alpha beeta gaama
do
arr=$elem
((x=x+1))
Done
SQL_SERVER='servername'
/apps/sun5/utils/sqsh -S $SQL_SERVER -U user -P pwd -b -h... (1 Reply)
Hey Folks and Gurus there
I am trying to replicate this logic in bash :
(1) if ; then
function1 parameters &
function2 parameters &
fi
Is there an easy method esp one with regex that can do this comparision.
e.g. $var is compared to this list ( case regardless ) (... (1 Reply)
Hi,
I am trying to write a script to show the status of a Network card.
Variables:
chosennic is a read variable
statuss=`/sbin/ifconfig $chosennic | grep MTU | awk '{print $1}'`
ipadd=`/sbin/ifconfig $chosennic | grep Bcast | awk '{print $2}' | awk -F : '{print $2}'`... (2 Replies)
I need to find the index of last '|' (highlighted in bold) in awk :
|ifOraDatabase.Lastservererr<>0then|iferr_flag<>0then|end if
Please suggest a way... Thanks (5 Replies)
I have a line "My name is Deepak"
How can i search a string Deepak in the line and find out its index position.
Here in this case the result should be 12. (3 Replies)
Hi,
I have a string like the following:
/db1/data/GLIDER/SYSTEM.dbf
need to find the postion where "SYSTEM.dbf" starts, so I tried:
LOCATION=/db1/data/GLIDER/SYSTEM.dbf
$ expr index $LOCATION SYSTEM
expr: syntax error
$ expr index "$LOCATION" SYSTEM
expr: syntax error
... (5 Replies)
i would like to search for a letter in a string and get its index position.
example:
name='john'
pos=$(expr index $name o)
the result will be equal to 2 (2nd position)
how do you make this thing not case sensitive?
example:
name='john'
pos=$(expr index $name O)
the... (1 Reply)
Hi All,
I am trying to to compare a string variable with a string literal inside a loop but keep getting the
./testifstructure.sh: line 6:
#!/bin/sh
BOOK_LIST="BOOK1 BOOK2"
for BOOK in ${BOOK_LIST}
do
if
then echo '1'
else
echo '2'
fi
done
Please use next... (1 Reply)
here below is sample string
null pointer dereference of 'resourceList' where null is returned from a method/opt/bld/fetch/ds/interzone/notification/LocalLineStatusNotificationListener.java:79
null pointer dereference of 'reList' where null is returned from a... (3 Replies)
Objective is to substitute Jan with 01, Feb with 02 and so on. The month will be provided as input.
I could construct below awk and it worked.
echo Jun | \
awk 'BEGIN{split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec",mon," ")}{ for (i=1;i<=12;i++){ if ($1==mon) printf("%02d\n",i)} }'
... (4 Replies)
Discussion started by: krishmaths
4 Replies
LEARN ABOUT DEBIAN
glgetattriblocation
GLGETATTRIBLOCATION(3G) [FIXME: manual] GLGETATTRIBLOCATION(3G)NAME
glGetAttribLocation - Returns the location of an attribute variable
C SPECIFICATION
GLint glGetAttribLocation(GLuint program, const GLchar *name);
PARAMETERS
program
Specifies the program object to be queried.
name
Points to a null terminated string containing the name of the attribute variable whose location is to be queried.
DESCRIPTION
glGetAttribLocation queries the previously linked program object specified by program for the attribute variable specified by name and
returns the index of the generic vertex attribute that is bound to that attribute variable. If name is a matrix attribute variable, the
index of the first column of the matrix is returned. If the named attribute variable is not an active attribute in the specified program
object or if name starts with the reserved prefix "gl_", a value of -1 is returned.
The association between an attribute variable name and a generic attribute index can be specified at any time by calling
glBindAttribLocation(). Attribute bindings do not go into effect until glLinkProgram() is called. After a program object has been linked
successfully, the index values for attribute variables remain fixed until the next link command occurs. The attribute values can only be
queried after a link if the link was successful. glGetAttribLocation returns the binding that actually went into effect the last time
glLinkProgram() was called for the specified program object. Attribute bindings that have been specified since the last link operation are
not returned by glGetAttribLocation.
ERRORS
GL_INVALID_OPERATION is generated if program is not a value generated by OpenGL.
GL_INVALID_OPERATION is generated if program is not a program object.
GL_INVALID_OPERATION is generated if program has not been successfully linked.
ASSOCIATED GETS
glGetActiveAttrib() with argument program and the index of an active attribute
glIsProgram()
SEE ALSO
glBindAttribLocation(), glLinkProgram(), glVertexAttrib(), glVertexAttribPointer()
COPYRIGHT
Copyright (C) 2003-2005 3Dlabs Inc. Ltd. 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/.
[FIXME: source] 05/30/2012 GLGETATTRIBLOCATION(3G)