Hi ,
like to ask if we use ksh script to take in parameter into $1
and how do i concatenate the $1 value with some words into a variable?? Below is what i have written and i think is wrong ,how do i write it?
datafile="Report" || $1 || ".xls" (Should become Report2000.xls)
echo... (3 Replies)
I need a way to build variable in this manner:
variable_$i
Inside a for loop i need to create it.
where i goes from 1 to 30..
and then i need to print them on screen with echo $variable_$i
which is the best way to do this? (6 Replies)
Hi
I need a script which will remove a path from PATH environment variable. For example
$echo PATH
/usr/local/bin:/usr/bin:test/rmve:/usr/games
$echo rmv
test/rmve
Here I need a shell script which will remove rmv path (test/rmve) from PATH... (9 Replies)
Hello All,
How to concatenate a string to a variable in a script
I'm having a file which is consisting of data and i need to extract the first line of the file and append it to a string.
/tmp/samp.list containg 60000
I like to concatenate it with a string (SS_)
grep -w SS_$(head -1... (1 Reply)
Hi,
Could anyone help me in writing a single line code by either using (sed, awk, perl or whatever) to extract a specific path from the PATH environment variable?
for eg: suppose the PATH is being set as follows
PATH=/usr/bin/:/usr/local/bin:/bin:/usr/sbin:/usr/bin/java:/usr/bin/perl3.4
... (2 Replies)
Hello,
It might be stupid question But I will ask it any way:)
var1="1 2 3 4"
var2="5 6 7 8"
var3=$var1\ $var2
var4="$var1\n$var2"
echo "$var1"
echo "$var2"
echo "$var3"
echo "$var4"
The result of executing this code is as follow
1 2 3 4
5 6 7 8
1 2 3 4 5 6 7 8
1 2 3 4\n5 6... (12 Replies)
Hello Folks,
I want to append a path in user's PATH variable which should be available in current session.
Background
Numerous persons will run a utility.
Aim is to add the absolute path of the utility the first time it runs so that next runs have the PATH in env & users can directly run... (6 Replies)
Hi I'm trying to select text between two lines, I'm using sed to to this, but I need to pass variables to it. For example
start="BEGIN /home/mavkoup/data"
end="END"
sed -n -e '/${start}/,/${end}/g' doesn't work. I've tried double quotes as well. I think there's a problem with the / in the... (4 Replies)
Hi Guys,
I have a file. Each record needs to inserted into a table. The table also have other columns which needs to be inserted with Shell variables.
The following is the file.
Error code None.
Error Code 1
The shell script is having these variables.
Name=Magesh
Dep=Coding
... (1 Reply)
Hi Guys,
I was scratching my head for this for half a day... finally not successful :confused:
Following is the problem
I have a variable
$ var1=123
$ var2-234
$ var3=345
and another Variable
$ i=1
Now i wanted to save these into a Variable as shown below
for i in 1 2 3
do... (5 Replies)
Discussion started by: ramprabhum
5 Replies
LEARN ABOUT XFREE86
glupickmatrix
GLUPICKMATRIX(3G)GLUPICKMATRIX(3G)NAME
gluPickMatrix - define a picking region
C SPECIFICATION
void gluPickMatrix( GLdouble x,
GLdouble y,
GLdouble delX,
GLdouble delY,
GLint *viewport )
PARAMETERS
x, y Specify the center of a picking region in window coordinates.
delX, delY
Specify the width and height, respectively, of the picking region in window coordinates.
viewport
Specifies the current viewport (as from a glGetIntegerv call).
DESCRIPTION
gluPickMatrix creates a projection matrix that can be used to restrict drawing to a small region of the viewport. This is typically useful
to determine what objects are being drawn near the cursor. Use gluPickMatrix to restrict drawing to a small region around the cursor.
Then, enter selection mode (with glRenderMode) and rerender the scene. All primitives that would have been drawn near the cursor are iden-
tified and stored in the selection buffer.
The matrix created by gluPickMatrix is multiplied by the current matrix just as if glMultMatrix is called with the generated matrix. To
effectively use the generated pick matrix for picking, first call glLoadIdentity to load an identity matrix onto the perspective matrix
stack. Then call gluPickMatrix, and finally, call a command (such as gluPerspective) to multiply the perspective matrix by the pick
matrix.
When using gluPickMatrix to pick NURBS, be careful to turn off the NURBS property GLU_AUTO_LOAD_MATRIX. If GLU_AUTO_LOAD_MATRIX is not
turned off, then any NURBS surface rendered is subdivided differently with the pick matrix than the way it was subdivided without the pick
matrix.
EXAMPLE
When rendering a scene as follows:
glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(...); glMatrixMode(GL_MODELVIEW);
a portion of the viewport can be selected as a pick region like this:
glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPickMatrix(x, y, width, height, viewport); gluPerspective(...); glMatrixMode(GL_MOD-
ELVIEW);
SEE ALSO glGet(3G), glLoadIndentity(3G), glMultMatrix(3G), glRenderMode(3G), gluPerspective(3G)GLUPICKMATRIX(3G)