In POSIX, it is unspecified whether or not the last stage of a pipeline is run in the current shell execution environment. (In ksh it is and the script in post #1 would work without change; in bash it is not and the value of a variable set in the last stage of the pipeline disappears when the pipeline completes execution.)
With any POSIX conforming shell, you could modify disedorgue's suggestion to:
and get what you want.
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)
In a bash script I've set a variable that is the directory name of where an executable lives.
the_dir=`dirname $which myscript`
which equates to something like "/path/to/dir/bin"
I need to cut that down to remove the "bin" so I now have "/path/to/dir/".
This sounds easy but as a... (2 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)
This may be a stupid question, but was wondering if it is possible to make a variable local to a particular script and invisible to an external script that may source the script where it is defined? Thanks as always (2 Replies)
Hi ,I am trying to assign string to variable ,but it doesn't work
Also could you show me different ways to use grep,(I am trying to get the first,second and first column form file,and I am counting the chars)
let name=`grep "$id" product | cut -c6-20` (25 Replies)
Hello,
Why is this not working in a script?
files="test.fsa"
echo $files
for file in $files
do
if
then
echo "$file does not exist."
fi
run a command
done
I get an error saying (3 Replies)
I have a file with
<suit:run date="Trump Tue 06/19/2012 11:41 AM EDT" machine="garg-ln" build="19921" level="beta" release="6.1.5" os="Linux">
Need to find word "build" then
extract build number, which is 19921 also
release number, which is 6.1.5 then
concatenate them to one variable as... (6 Replies)
Hi,
I've been stuck for several days on this. Using grep on a command line, I can use quotes, eg...
grep 'pattern of several words' filename
I want to do this in my bash script. In my script I have captured the several command line arguments (eg arg1 arg2) into a variable:
variable=$@
I... (2 Replies)
I'm trying to write a basic bash script that takes input you give (what directory, if any, what name, if any ....) and passes the information to find.
I'm trying to just create a string with all variables and then pass it to find. So far I have this extremely simple:
#!/bin/bash -f
... (2 Replies)
Discussion started by: Starting_Leaf
2 Replies
LEARN ABOUT DEBIAN
gluseprogramstages
GLUSEPROGRAMSTAGES(3G) [FIXME: manual] GLUSEPROGRAMSTAGES(3G)NAME
glUseProgramStages - bind stages of a program object to a program pipeline
C SPECIFICATION
void glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);
PARAMETERS
pipeline
Specifies the program pipeline object to which to bind stages from program.
stages
Specifies a set of program stages to bind to the program pipeline object.
program
Specifies the program object containing the shader executables to use in pipeline.
DESCRIPTION
glUseProgramStages binds executables from a program object associated with a specified set of shader stages to the program pipeline object
given by pipeline. pipeline specifies the program pipeline object to which to bind the executables. stages contains a logical combination
of bits indicating the shader stages to use within program with the program pipeline object pipeline. stages must be a logical combination
of GL_VERTEX_SHADER_BIT, GL_TESS_CONTROL_SHADER_BIT, GL_TESS_EVALUATION_SHADER_BIT, GL_GEOMETRY_SHADER_BIT, and GL_FRAGMENT_SHADER_BIT.
Additionally, the special value GL_ALL_SHADER_BITS may be specified to indicate that all executables contained in program should be
installed in pipeline.
If program refers to a program object with a valid shader attached for an indicated shader stage, glUseProgramStages installs the
executable code for that stage in the indicated program pipeline object pipeline. If program is zero, or refers to a program object with no
valid shader executable for a given stage, it is as if the pipeline object has no programmable stage configured for the indicated shader
stages. If stages contains bits other than those listed above, and is not equal to GL_ALL_SHADER_BITS, an error is generated.
ERRORS
GL_INVALID_VALUE is generated if shaders contains set bits that are not recognized, and is not the reserved value GL_ALL_SHADER_BITS.
GL_INVALID_OPERATION is generated if program refers to a program object that was not linked with its GL_PROGRAM_SEPARABLE status set.
GL_INVALID_OPERATION is generated if program refers to a program object that has not been successfully linked.
GL_INVALID_OPERATION is generated if pipeline is not a name previously returned from a call to glGenProgramPipelines() or if such a name
has been deleted by a call to glDeleteProgramPipelines().
SEE ALSO
glGenProgramPipelines(), glDeleteProgramPipelines(), glIsProgramPipeline()
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/.
[FIXME: source] 05/30/2012 GLUSEPROGRAMSTAGES(3G)