05-31-2007
add text to end of text file
Hi,
I assume there is a simple solution, but as usual i can't find it!
How can i add a line of text to the end of a text file on a new line?
i.e
file.txt
________________
this is my text file
________________
file.txt
________________
this is my text file
WITH A NEW LINE
________________
Thanks for your time
Lee
This User Gave Thanks to leeRoberts2007 For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I've got 2 files.
File 1 has a list say
a
b
c
d
e
f
File 2 got
start=
What I want is to create File 3 which look like this
start=a,b,c,d,e,f
So is it possible to loop throught File1 to echo it into File3 in one line? (3 Replies)
Discussion started by: stinkefisch
3 Replies
2. Shell Programming and Scripting
Hi All,
I have a file as below:
cat myfile
abcdef
NA
rwer
tyujkl
na
I wish to add the text ".txt" at the end of all lines except the lines starting with NA or na.
I know i can add text at the end of line using following command but I am not sure how to valiate the condition. (14 Replies)
Discussion started by: angshuman
14 Replies
3. Shell Programming and Scripting
Well here goes:
I tried to write a batch file that adds a specific fixed text to each line of an already existing text file.
for the adding text infront of each line I tried this:
for /F "delims=" %%j in (list.txt) do echo.STARTTEXT\%%j >> list.txt
for adding text after each line I... (0 Replies)
Discussion started by: pasc
0 Replies
4. Shell Programming and Scripting
I need help with insert text to the last line of text file with echo command
I know can do something like echo "i4\n$logtext\n.\nwq" | ex -s $file can insert to first line, but how can i change this code in order to insert to the last line of text file?
please help, thank you :( (2 Replies)
Discussion started by: gavin_L
2 Replies
5. Shell Programming and Scripting
I'd like to write up notes in a relatively readable format and then use a shell script to add LaTeX formatting. Specifically, I'm trying to figure out how to add the LaTeX newline character (\\) to the end of lines without \begin{} or \end{} statements
example notes file:
\begin{enumerate}
--... (2 Replies)
Discussion started by: icskittles
2 Replies
6. Shell Programming and Scripting
Dear All
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies
7. UNIX for Dummies Questions & Answers
Hello All,
this is my first post so I don't know if I am doing this right.
I would like to append entries from a series of strings (contained in a text file) consecutively at the end of specifically labeled lines in another file.
As an example:
- the file that contains the values to be... (3 Replies)
Discussion started by: gus74
3 Replies
8. Windows & DOS: Issues & Discussions
so...
Lets assume I have a text file.
The text file contains multiple "#" symbols.
I want to replace all thos "#"s with a STRING using DOS/Batch
I want to add a certain TEXT to the end of each line.
How can I do this WITHOUT aid of sed, grep or anything linux related ? (1 Reply)
Discussion started by: pasc
1 Replies
9. Shell Programming and Scripting
Seems simple but ive been searching for a good hour of so
I have a text file and would like to add a string to the end of line 5 ( as an example)
to ake tings hard the line number we have to add the text to is stored in a variable cunningly name $Line_to_append
any ideas on how this could... (2 Replies)
Discussion started by: dunryc
2 Replies
10. Shell Programming and Scripting
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
LEARN ABOUT XFREE86
glfrustum
GLFRUSTUM(3G) GLFRUSTUM(3G)
NAME
glFrustum - multiply the current matrix by a perspective matrix
C SPECIFICATION
void glFrustum( GLdouble left,
GLdouble right,
GLdouble bottom,
GLdouble top,
GLdouble near_val,
GLdouble far_val )
PARAMETERS
left, right Specify the coordinates for the left and right vertical clipping planes.
bottom, top Specify the coordinates for the bottom and top horizontal clipping planes.
near_val, far_val
Specify the distances to the near and far depth clipping planes. Both distances must be positive.
DESCRIPTION
glFrustum describes a perspective matrix that produces a perspective projection. The current matrix (see glMatrixMode) is multiplied by
this matrix and the result replaces the current matrix, as if glMultMatrix were called with the following matrix as its argument:
[__________ 0 A 0]
0 __________ B 0
0 0 C D
0 0 -1 0
A=__________
B=__________
C=-________________
D=-________________
Typically, the matrix mode is GL_PROJECTION, and (left, bottom, -near_val) and (right, top, -near_val) specify the points on the near
clipping plane that are mapped to the lower left and upper right corners of the window, assuming that the eye is located at (0, 0, 0).
-far_val specifies the location of the far clipping plane. Both near_val and far_val must be positive.
Use glPushMatrix and glPopMatrix to save and restore the current matrix stack.
NOTES
Depth buffer precision is affected by the values specified for near_val and far_val. The greater the ratio of far_val to near_val is, the
less effective the depth buffer will be at distinguishing between surfaces that are near each other. If
r=________
roughly log2(r) bits of depth buffer precision are lost. Because r approaches infinity as near_val approaches 0, near_val must never be
set to 0.
ERRORS
GL_INVALID_VALUE is generated if near_val or far_val is not positive, or if left = right, or bottom = top.
GL_INVALID_OPERATION is generated if glFrustum is executed between the execution of glBegin and the corresponding execution of glEnd.
ASSOCIATED GETS
glGet with argument GL_MATRIX_MODE
glGet with argument GL_MODELVIEW_MATRIX
glGet with argument GL_PROJECTION_MATRIX
glGet with argument GL_TEXTURE_MATRIX
glGet with argument GL_COLOR_MATRIX
SEE ALSO
glOrtho(3G), glMatrixMode(3G), glMultMatrix(3G), glPushMatrix(3G), glViewport(3G)
GLFRUSTUM(3G)