06-11-2013
Me too, I'm not clear what you want to achieve. Do you want the original file to contain a single "0" char after the operation if before it is empty?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to write a sed command that does the following work:
file: <a>asdfasdf<\s>
<line>hello</line>
<b>adf<\c>
<b>tttttttt<\c>
output:
name=hello
sed -e 's/^*//' -n -e '/<line>/s/<*>//gp;' -e 's/^/name="/g' file
but I can not append "=" after getting the line with... (5 Replies)
Discussion started by: minifish
5 Replies
2. Shell Programming and Scripting
I am using tar command to append daily database backups on tape. "tar --append " command help me to do this.
But tar --append command does not produce any output on stdout if it succeed.
I want the output for that appended command to a log file.
This log file should contain only the name of the... (0 Replies)
Discussion started by: pganguly46
0 Replies
3. Shell Programming and Scripting
Hi,
How to append something to already existing word.
Suppose, I have the following line as a part of a file.
VVV= jdbc:... (6 Replies)
Discussion started by: Dpu
6 Replies
4. Shell Programming and Scripting
HELLO!!
I'm trying to pass a variable with in the 'sed' command (which would add some piece of code to file at a particular line). We can use
sed '{line-number}a\
alfjaljf\
aslfjsfsjafl\
adlfjaf\' file.txt
If file.txt is
Now, I would like to add the parameter 'lmn' after... (1 Reply)
Discussion started by: mjavalkar
1 Replies
5. Shell Programming and Scripting
Hi all;
I am running a script:/var/tmp/gcsw -ne | grep "State:2" | wc
that gives me output like:80 480 6529
but i need this output as:2013-01-18 13:00 -> 80 480 6529 (1 Reply)
Discussion started by: gc_sw
1 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I'm relatively new to Unix scripting and am trying to get my head around piping.
I'm trying to take a header record from one file and prepend it to another file. I've done this by creating several temp files but i'm wondering if there is a cleaner way to do this.
I'm thinking... (10 Replies)
Discussion started by: BigCroyd
10 Replies
7. Shell Programming and Scripting
Hello.
Ive spent probably a hour on this problem, and cant figure it out.
Let me explain the problem.
I run head -n5 datasets/q13data.txt and get this :
$$001011<-:::$$<-::: '
GreenWHITE<-::3.1415<-:::"BLACK
fubar<-:::phi<-:::foochi
$$$Yellow->:::'<-:::VOIDTue
taochi->::$->:::Blue"... (12 Replies)
Discussion started by: jozo95
12 Replies
8. UNIX for Dummies Questions & Answers
I want to know how this command output will be
sed 's/^"\(.*\)"$/\1/' <filename> (3 Replies)
Discussion started by: abhilashnair
3 Replies
9. Shell Programming and Scripting
hello Team,
I am looking for sed command or script which will append word at end of line. for example. I want to validate particular filesystem with mount |<filesystem name> command. if nodev parameter is not there then it should add in the fstab file with receptive to the filesystem.
# mount... (8 Replies)
Discussion started by: ghpradeep
8 Replies
10. Programming
Experts,
I am writing a script and able to write only small piece of code and not able to collect logic to complete this task.
In input file have to look for name like like this (BGL_HSR_901_1AG_A_CR9KTR10) before sh iss neors. Record this (BGL_HSR_901_1AG_A_CR9KTR10) in csv file
Now have to... (0 Replies)
Discussion started by: as7951
0 Replies
LEARN ABOUT OSX
glclearbuffer
GLCLEARBUFFER(3G) OpenGL 3.3 GLCLEARBUFFER(3G)
NAME
glClearBuffer - clear individual buffers of the currently bound draw framebuffer
C SPECIFICATION
void glClearBufferiv(GLenum buffer, GLint drawBuffer, const GLint * value);
void glClearBufferuiv(GLenum buffer, GLint drawBuffer, const GLuint * value);
void glClearBufferfv(GLenum buffer, GLint drawBuffer, const GLfloat * value);
void glClearBufferfi(GLenum buffer, GLint drawBuffer, GLfloat depth, GLint stencil);
PARAMETERS
buffer
Specify the buffer to clear.
drawBuffer
Specify a particular draw buffer to clear.
value
For color buffers, a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to. For depth buffers, a
pointer to a single depth value to clear the buffer to. For stencil buffers, a pointer to a single stencil value to clear the buffer
to.
depth
The value to clear a depth render buffer to.
stencil
The value to clear a stencil render buffer to.
DESCRIPTION
glClearBuffer* clears the specified buffer to the specified value(s). If buffer is GL_COLOR, a particular draw buffer GL_DRAWBUFFERi is
specified by passing i as drawBuffer. In this case, value points to a four-element vector specifying the R, G, B and A color to clear that
draw buffer to. If buffer is one of GL_FRONT, GL_BACK, GL_LEFT, GL_RIGHT, or GL_FRONT_AND_BACK, identifying multiple buffers, each selected
buffer is cleared to the same value. Clamping and conversion for fixed-point color buffers are performed in the same fashion as
glClearColor().
If buffer is GL_DEPTH, drawBuffer must be zero, and value points to a single value to clear the depth buffer to. Only glClearBufferfv
should be used to clear depth buffers. Clamping and conversion for fixed-point depth buffers are performed in the same fashion as
glClearDepth().
If buffer is GL_STENCIL, drawBuffer must be zero, and value points to a single value to clear the stencil buffer to. Only glClearBufferiv
should be used to clear stencil buffers. Masing and type conversion are performed in the same fashion as glClearStencil().
glClearBufferfi may be used to clear the depth and stencil buffers. buffer must be GL_DEPTH_STENCIL and drawBuffer must be zero. depth
and stencil are the depth and stencil values, respectively.
The result of glClearBuffer is undefined if no conversion between the type of value and the buffer being cleared is defined. However, this
is not an error.
ERRORS
GL_INVALID_ENUM is generated by glClearBufferif, glClearBufferfv and glClearBufferuiv if buffer is not GL_COLOR, GL_FRONT, GL_BACK,
GL_LEFT, GL_RIGHT, GL_FRONT_AND_BACK, GL_DEPTH or GL_STENCIL.
GL_INVALID_ENUM is generated by glClearBufferfi if buffer is not GL_DEPTH_STENCIL.
GL_INVALID_VALUE is generated if buffer is GL_COLOR, GL_FRONT, GL_BACK, GL_LEFT, GL_RIGHT, or GL_FRONT_AND_BACK and drawBuffer is greater
than or equal to GL_MAX_DRAW_BUFFERS.
GL_INVALID_VALUE is generated if buffer is GL_DEPTH, GL_STENCIL or GL_DEPTH_STENCIL and drawBuffer is not zero.
SEE ALSO
glClearColor(), glClearDepth(), glClearStencil(), glClear()
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 GLCLEARBUFFER(3G)