With \(.*\) you can select portions of a string. This portion is recalled in the replacement string with \1, \2, \3 etc.
The first portion is the begin of the string until the space before the last minus sign (before " - From").
The second portion are the 3 characters " - " before "From" and the last portion is the rest of the line.
In the replacement string the portion is recalled in the order \3\2\1.
Have a read of a sed tutorial, you can find some links here:
My issue is the following:
I have several text files, let's say 10 of them. Each one has three columns separated by a tab: Date, Time and Value. What I want to do next is to have only one text file containing the information: Date, Time, Value1, Value2, Value3, ... , Value10, where Value1... (2 Replies)
Hello,
I am trying to solve for a couple of hours now the following problem:
I have n files and would like to add the third column of each file to a new file:
temp1.txt
1 2 3
1 2 3
1 2 3
temp2.txt
1 2 4
1 2 4
1 2 4
1 2 4
temp3.txt (2 Replies)
I keep trying to append some astrix to the end of a line, but it keeps overwriting at the front of the line.
These are the originals
Fred Fardbarkle:674-843-1385:20 Parak Lane, Duluth, MN 23850:4/12/23:780900
Fred Fardbarkle:674-843-1385:20 Parak Lane, Duluth, MN 23850:4/12/23:780900
... (5 Replies)
Hi,
I am using ksh, I want to read one csv file and append the columns of another file with new column.
My input file:
col1,col2
---------
siri,886
satya,890
priya,850
Another file with the below date:(test.csv)
col3
-----
321
333
442 (1 Reply)
Hi ,
I have the below ouput,
=====gopi=====
assasassaa
adsadsadsdsada
asdsadsadasdsa
sadasdsadsd
=====kannan===
asdasdasd
sadasddsaasd
adasdd
=====hbk===
asasasssa
....
..
I want the output like as below, not able paste here correctly. (2 Replies)
Hi Solved these kind of issues using these codes But these are not wrking for my attached files can anybody check........
awk 'NR==FNR{X++;next}{if(X){print}}' file1 file2
awk 'NR==FNR{X=$0;next}{n=split($1,P," ");sub($1,"",$0);for(i=1;i<=n;i++){if(X]){print P,$0}}}' file1 FS="\t" file2
... (6 Replies)
Required No.of field = 12
Let say you got a “~” delimited input file and this file has 6 input fields and now I want to add 12-5=7 number of “~” into this input file in order to make it 12 fields
datafile can have n number of records
ex.,
a~b~c~d~12~r
a~b~c~d~12~r
a~b~c~d~12~r... (19 Replies)
Discussion started by: LJJ
19 Replies
LEARN ABOUT XFREE86
gldrawbuffer
GLDRAWBUFFER(3G)GLDRAWBUFFER(3G)NAME
glDrawBuffer - specify which color buffers are to be drawn into
C SPECIFICATION
void glDrawBuffer( GLenum mode )
PARAMETERS
mode Specifies up to four color buffers to be drawn into. Symbolic constants GL_NONE, GL_FRONT_LEFT, GL_FRONT_RIGHT, GL_BACK_LEFT,
GL_BACK_RIGHT, GL_FRONT, GL_BACK, GL_LEFT, GL_RIGHT, GL_FRONT_AND_BACK, and GL_AUXi, where i is between 0 and
``GL_AUX_BUFFERS'' -1, are accepted (GL_AUX_BUFFERS is not the upper limit; use glGet to query the number of available aux buffers.)
The initial value is GL_FRONT for single-buffered contexts, and GL_BACK for double-buffered contexts.
DESCRIPTION
When colors are written to the frame buffer, they are written into the color buffers specified by glDrawBuffer. The specifications are as
follows:
GL_NONE No color buffers are written.
GL_FRONT_LEFT Only the front left color buffer is written.
GL_FRONT_RIGHT Only the front right color buffer is written.
GL_BACK_LEFT Only the back left color buffer is written.
GL_BACK_RIGHT Only the back right color buffer is written.
GL_FRONT Only the front left and front right color buffers are written. If there is no front right color buffer, only the
front left color buffer is written.
GL_BACK Only the back left and back right color buffers are written. If there is no back right color buffer, only the
back left color buffer is written.
GL_LEFT Only the front left and back left color buffers are written. If there is no back left color buffer, only the
front left color buffer is written.
GL_RIGHT Only the front right and back right color buffers are written. If there is no back right color buffer, only the
front right color buffer is written.
GL_FRONT_AND_BACK All the front and back color buffers (front left, front right, back left, back right) are written. If there are
no back color buffers, only the front left and front right color buffers are written. If there are no right color
buffers, only the front left and back left color buffers are written. If there are no right or back color buf-
fers, only the front left color buffer is written.
GL_AUXi Only auxiliary color buffer i is written.
If more than one color buffer is selected for drawing, then blending or logical operations are computed and applied independently for each
color buffer and can produce different results in each buffer.
Monoscopic contexts include only left buffers, and stereoscopic contexts include both left and right buffers. Likewise, single-buffered
contexts include only front buffers, and double-buffered contexts include both front and back buffers. The context is selected at GL ini-
tialization.
NOTES
It is always the case that GL_AUXi = GL_AUX0 + i.
ERRORS
GL_INVALID_ENUM is generated if mode is not an accepted value.
GL_INVALID_OPERATION is generated if none of the buffers indicated by mode exists.
GL_INVALID_OPERATION is generated if glDrawBuffer is executed between the execution of glBegin and the corresponding execution of glEnd.
ASSOCIATED GETS
glGet with argument GL_DRAW_BUFFER
glGet with argument GL_AUX_BUFFERS
SEE ALSO glBlendFunc(3G), glColorMask(3G), glIndexMask(3G), glLogicOp(3G), glReadBuffer(3G)GLDRAWBUFFER(3G)