This doesn't use shellforge at all. It write()'s the raw strings from argv to standard output. That's what had me so puzzled: There's some very important steps missing between this and even the nonfunctional example you posted.
sizeof() doesn't work on strings either since sizeof() is fixed at compile-time while strings can vary at runtime. It only gives you the size of the pointer pointing to the string. strlen() would be what you want.
I'm trying to pass a filename, or all the files in the current directory to the ls command with a script. Unsuccessful so far, here are a few of my attempts:
#!/bin/ksh
read fname
#if (( $# > 0 )); then
$fname | ls -l
#fi
this produces a long listing of all the files in my current... (4 Replies)
Is it possible to pass a string as an argument from the command line?
I know I can pass a word in but can I put a line of text in with spaces and fullstops or do I just put it in brackets or quotes so the compiler can differinate between the first argument and the second. (1 Reply)
Hi,
I have a script which adds the user credentials to an ldap server. Im passing the variables as below..
/path/my_script $uname $pwd $environ ${deposit}
If i enter some special characters like ';' in $pwd, script returns an error which is set to display if the user enters... (5 Replies)
Hi
I have a script to which I pass multiple arguments, for example lets say the script name is "abc". I run the script like
./abc def /file <directory location>
In the above "def" is the first argument and "/file" is the second argument. I expect <directory location> that is passed after... (4 Replies)
I have a shell script which is invoked by passing an argument. The outer shell script calls another subshell and I want the argument passed down to flow down to the subshell.
E.g
Invoking a shell ======>> abc_refresh.ksh NM
Below is the content of abc_refresh.ksh
Value1=$1... (7 Replies)
I need to pass arguments to a shell script.My batch is calling some java program.
#################
x=$1
y=$2
java -classpath program
###################
if first parameter and second parameter is null then
java -classpath program
if first parameter is not null and second parameter is... (3 Replies)
I have noticed this thing using csh when passing arguments
Suppose I call a csh script using
../Scripts/plot-model.csh -vmod="npt02-z30.vmod" -R="0/80/0/30" -c="0/4.5" -aspr="1:10"
Somehow the " get removed when doing
$argv
ending up with
-vmod=npt02-z30.vmod... (0 Replies)
I have an for loop that reads the following file
cat param.cfg
val1:env1:opt1
val2:env2:opt2
val3:env3:opt3
val4:env4:opt4
.
.
The for loop extracts the each line of the file so that at any one point, the value of i is
val1:env1:opt1 etc...
I would like to extract each... (19 Replies)
Hi,
i have a file.txt with data
Bangalore
Chennai
Hyd
filename of the script is: new.sh
result=`cat file.txt | grep $1`
if
then
echo pass
else
echo fail
fi
i am executing the file in the cmd line as "sh new.sh Bangalore"
o/p is pass
if i give "sh new.sh delhi"
o/p is... (6 Replies)
Discussion started by: harsha85
6 Replies
LEARN ABOUT DEBIAN
glisprogram
GLISPROGRAM(3G) [FIXME: manual] GLISPROGRAM(3G)NAME
glIsProgram - Determines if a name corresponds to a program object
C SPECIFICATION
GLboolean glIsProgram(GLuint program);
PARAMETERS
program
Specifies a potential program object.
DESCRIPTION
glIsProgram returns GL_TRUE if program is the name of a program object previously created with glCreateProgram() and not yet deleted with
glDeleteProgram(). If program is zero or a non-zero value that is not the name of a program object, or if an error occurs, glIsProgram
returns GL_FALSE.
NOTES
No error is generated if program is not a valid program object name.
A program object marked for deletion with glDeleteProgram() but still in use as part of current rendering state is still considered a
program object and glIsProgram will return GL_TRUE.
ASSOCIATED GETS
glGet() with the argument GL_CURRENT_PROGRAM
glGetActiveAttrib() with arguments program and the index of an active attribute variable
glGetActiveUniform() with arguments program and the index of an active uniform variable
glGetAttachedShaders() with argument program
glGetAttribLocation() with arguments program and the name of an attribute variable
glGetProgram() with arguments program and the parameter to be queried
glGetProgramInfoLog() with argument program
glGetUniform() with arguments program and the location of a uniform variable
glGetUniformLocation() with arguments program and the name of a uniform variable
SEE ALSO
glAttachShader(), glBindAttribLocation(), glCreateProgram(), glDeleteProgram(), glDetachShader(), glLinkProgram(), glUniform(),
glUseProgram(), glValidateProgram()
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 GLISPROGRAM(3G)