06-22-2009
what about if the string assigned to the variable isn't a constant length? i.e. the string assigned to that variable changes.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everyone,
I am trying to search for a string in a file that is partly made up of a variable. Here's the code:
echo "parentCategory = $parentCategory"
echo "parentCategoryFormatted = $parentCategoryFormatted"
numUrlsFoundInParentCategory=`grep -c "<Topic r:id=\"Top\/World\/Français\/"... (2 Replies)
Discussion started by: BlueberryPickle
2 Replies
2. Shell Programming and Scripting
Hi,
I have got this shell script that writes certain data to a file after reading a few things from another file.
while read line
do
name=$line
echo "perl $line" >> file.sh
done < a.properties
Now the problem is that when I am running it in one UNIX server (SunOS 5.8) it... (4 Replies)
Discussion started by: King Nothing
4 Replies
3. Shell Programming and Scripting
hello everyone...im having this problem with unexpected EOF with line 85 which is..i cant see whats wrong with it..can any1 plz help me out.
read -p "$p1 please enter the number of tries you wish to have:" lifeline
function main()
{
guessnum=0
read -p "Please... (6 Replies)
Discussion started by: Freakhan
6 Replies
4. Shell Programming and Scripting
Hi there,
I have a file with lines like these:
0105:ffff0000:001b:01f4:25:434
0299:ffff0000:0009:01f4:2:319
02d2:ffff0000:000e:01f4:2:507
The above values are split up using ":" characters.
I would like capture each value, no matter what length.
Take for example the first line... (8 Replies)
Discussion started by: MastaG
8 Replies
5. Shell Programming and Scripting
I have a piece of Linux script. It tells me some syntax error. I couldn't find it. Please help me to identify them. Thanks. The code looks like this:
export ORACLE_SID=MYDB
export SPW=`cat /opt/oracle/scripts/.sys_pw_$ORACLE_SID`
export check_arch=`sqlplus -s << EOF
/ as sysdba... (7 Replies)
Discussion started by: duke0001
7 Replies
6. Shell Programming and Scripting
hii all
i have a file a which contains some thing like this
strand smthg position
+ yyx 3020
- yyw 10,000
now i have another file (file2) which contains the data starting from 1 to n positions
i want to refer first file if + ... (4 Replies)
Discussion started by: anurupa777
4 Replies
7. Shell Programming and Scripting
Hi,
can someone kindly look into my copy script and figure out why am i getting a "unexpected EOF while looking for matching `"' error message
#!/bin/ksh -x
cd /home/goldenga/test/flag37
if ; then
rm copied.ok
cd /home/goldenga/test
Upper=`ls -t|grep 'qw*'|cut -d "w" -f 2|head... (4 Replies)
Discussion started by: NDalal007
4 Replies
8. Shell Programming and Scripting
Hi everyone, I'm really new in shell scripting and having trouble resolving this error.
Can someone please tell me why I'm getting these errors?
Error Message:
./test.sh: line 50: unexpected EOF while looking for matching `''
./test.sh: line 53: syntax error: unexpected end of file
... (4 Replies)
Discussion started by: simonirang
4 Replies
9. Shell Programming and Scripting
Since cPanel does not support deleting emails older then X amount of days I am using the following on a Cron Job.
find -P /home/user/mail/domain/ -mindepth 2 -mtime '+366' -type f -printf '"%p"\n' | grep -v '/Important' | grep -v '/.Important' | xargs -I {} rm -r "{}"
Executing it via SSH... (4 Replies)
Discussion started by: tiagom
4 Replies
10. Shell Programming and Scripting
I am trying to get grep with awk command into variable.
But facing error.
Could someone pls help.
$ cat test_file
DEPLOYMENT="abc" # com
cluster="bcn"
$ grep DEPLOYMENT test_file | awk -F "\"" '{ print $2 }'
abc
$ a=`echo "grep DEPLOYMENT test_file | awk -F \"\\\"\" '{ print $2 }'"` ;... (6 Replies)
Discussion started by: Manasa Pradeep
6 Replies
LEARN ABOUT MOJAVE
glbindfragdatalocation
GLBINDFRAGDATALOCATI(3G) OpenGL 3.3 GLBINDFRAGDATALOCATI(3G)
NAME
glBindFragDataLocation - bind a user-defined varying out variable to a fragment shader color number
C SPECIFICATION
void glBindFragDataLocation(GLuint program, GLuint colorNumber, const char * name);
PARAMETERS
program
The name of the program containing varying out variable whose binding to modify
colorNumber
The color number to bind the user-defined varying out variable to
name
The name of the user-defined varying out variable whose binding to modify
DESCRIPTION
glBindFragDataLocation explicitly specifies the binding of the user-defined varying out variable name to fragment shader color number
colorNumber for program program. If name was bound previously, its assigned binding is replaced with colorNumber. name must be a
null-terminated string. colorNumber must be less than GL_MAX_DRAW_BUFFERS.
The bindings specified by glBindFragDataLocation have no effect until program is next linked. Bindings may be specified at any time after
program has been created. Specifically, they may be specified before shader objects are attached to the program. Therefore, any name may be
specified in name, including a name that is never used as a varying out variable in any fragment shader object. Names beginning with gl_
are reserved by the GL.
In addition to the errors generated by glBindFragDataLocation, the program program will fail to link if:
o The number of active outputs is greater than the value GL_MAX_DRAW_BUFFERS.
o More than one varying out variable is bound to the same color number.
NOTES
Varying out varyings may have indexed locations assigned explicitly in the shader text using a location layout qualifier. If a shader
statically assigns a location to a varying out variable in the shader text, that location is used and any location assigned with
glBindFragDataLocation is ignored.
ERRORS
GL_INVALID_VALUE is generated if colorNumber is greater than or equal to GL_MAX_DRAW_BUFFERS.
GL_INVALID_OPERATION is generated if name starts with the reserved gl_ prefix.
GL_INVALID_OPERATION is generated if program is not the name of a program object.
ASSOCIATED GETS
glGetFragDataLocation() with a valid program object and the the name of a user-defined varying out variable
SEE ALSO
glCreateProgram(), glGetFragDataLocation()
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/.
OpenGL 3.3 03/08/2011 GLBINDFRAGDATALOCATI(3G)