Sponsored Content
Top Forums UNIX for Dummies Questions & Answers HOWTO Append String to End of Line Post 302225533 by Franklin52 on Friday 15th of August 2008 03:30:52 PM
Old 08-15-2008
Another approaches:

Code:
sed 's/.*/&,000000/' file

or:

Code:
awk '{print $0,",000000"}' file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How can I append a string at the end of a line in a file

Hi, guys. I have one question: I have a file called "group", the contents of it is below: ******************************** ... test:x:203: sales:x:204: repair:x:205: research:x:206:brownj ... *********** Now I want to add string ",sherrys" at the end of "research:x:206:brownj", so... (5 Replies)
Discussion started by: daikeyang
5 Replies

2. Shell Programming and Scripting

How do I append a ^M to the end of each 129 character string

Hello all, I have a stumper of a problem. I am trying to append a ^M or "newline" to the end of each 129 character string in a huge file in unix. Each string starts with A00. I am trying to get the file to go from... A00vswjdv1 Test Junk Junk A00vswjdv2 Test Junk Junk ... (6 Replies)
Discussion started by: Captain
6 Replies

3. Shell Programming and Scripting

Append a string at the end of every line in a file

Hi Friends, I have a file with many lines as shown below. /START SAMPLE LINE/ M:\mmarimut_v6.4.0_pit_01\java\build.xml@@\main\v6.4.0_pit_a M:\mmarimut_v6.4.0_pit_01\port\Post.java@@\main\v6.4.0_pit_a M:\mmarimut_v6.4.0_pit_01\switchview\View.java@@\main\v6.4.0_pit_a /END SAMPLE LINE/ I... (1 Reply)
Discussion started by: nmattam
1 Replies

4. Shell Programming and Scripting

Append the end of each line in a file with a given string

Hi friends, I have a file containing many lines as follows. M:\mmarimut_v6.4.0_pit_01\java\build.xml@@\main\v6.4.0_pit_a M:\mmarimut_v6.4.0_pit_01\ADBasicView.java@@\main\v6.4.0_pit_a I would like to append the string "\0" at the end of each line in the file. The output should look... (10 Replies)
Discussion started by: nmattam
10 Replies

5. Shell Programming and Scripting

find a certain line and append text to the end of the line

After I create printer queues in AIX, I have to append a filter file location within that printers custom file. within lets say test_queue.txt I need to find the row that starts with :699 and then I need to append on the end the string /usr/local/bin/k_portrait.sh. Now I've gotten the sed... (2 Replies)
Discussion started by: peachclift
2 Replies

6. Shell Programming and Scripting

append blank spaces at the end of a variable string

Hello, could you please help with this one. I have an input file like this: 123,4567,89000 123456789,9876543,12 and for the output I need strings to be with the fixed length, let's say 15, and if the string is -lt 15 to be populated with blanks at the end until it reach 15, like this: 123 ,4567... (1 Reply)
Discussion started by: apenkov
1 Replies

7. Shell Programming and Scripting

Search for a string, then append character to end of that line only

I have 2 files that I am working with $ cat file1 server1 server3 server5 server6 server8 $ cat file2 server1;Solaris; server2; SLES; server3;Linux; server4; Solaris; server5;SLES; server6;SLES; server7;Solaris; server8;Linux; (1 Reply)
Discussion started by: snoman1
1 Replies

8. Shell Programming and Scripting

sed - Find a String and append a text end of the Line

Hi, I have a File, which have multiple rows. Like below 123456 Test1 FNAME JRW#$% PB MO Approver XXXXXX. YYYY 123457 Test2 FNAME JRW#$% PB MO Super XXXXXX. YYYY 123458 Test3 FNAME JRW#$% PB MO Approver XXXXXX. YYYY I want to search a line which contains PB MO Approver and append... (2 Replies)
Discussion started by: java2006
2 Replies

9. Shell Programming and Scripting

Append this string to end of each line

Platform: Solaris 10 I have a file like below $ cat languages.txt Spanish Norwegian English Persian German Portugese Chinese Korean Hindi Malayalam Bengali Italian Greek Arabic I want to append the string " is a great language" at end of each line in this file. (3 Replies)
Discussion started by: omega3
3 Replies

10. UNIX for Advanced & Expert Users

Help in adding a string at the end of each line and append files vertically

hi, i need a help in the script , need to append a string at the end of each line of a files , and append the files into a single file vertically. eg file1 has the following columns abc,def,aaa aaa,aa,aaa files 2 has the following rows and columns abc,def,aaa aaa,aa,aaa i... (3 Replies)
Discussion started by: senkerth
3 Replies
discgrp(5gv)						     Geometry Project Programs						      discgrp(5gv)

NAME
discrete group file formats SYNOPSIS
An ascii file representation of a discrete geometric group. SUMMARY
This file format applies to a wide variety of groups encountered in topology and geometry. At the beginning of the file is the string DIS- CGRP, in conformity with other OOGL file formats (see oogl(5)). The remainder of the file is a series of parenthesized expressions. The file format is based on an expandable set of key markers and values. A typical entry would be (group borromean ) where parentheses enclose the expression. The string 'group' is called the key marker. The remaining text contains a value, in this case a character string which is the name of the group. Key markers currently recognized and their values include: group A name for this group. comment An arbitrary comment [maximum length 256 bytes] [must be enclosed in double quotes] attribute One of a several keyword identifiers including: euclidean is a euclidean group hyperbolic is a hyperbolic group spherical is a spherical group transposed the matrices are transposed finite this is a finite group model In the case that 'hyperbolic' is an attribute, and the dimension is three, this keyword sets the model that is expected for reading subsequent isometries, i.e., expects elements of SL(2,C) if the model is upperhalfspace or conformalball and O(3,1,R) if it is projective. projective default upperhalfspace conformalball [not currently implemented] display These values set characteristics of the the display of the discrete group. centercam keeps the camera centered in central dirichlet domain. zcull removes tiles which lie behind the camera. showcam if centercam is set, displays camgeom, if provided (see below). dimn The dimension of the space. ngens Number of generators. gens List of generators. nels Number of group elements. els List of group elements. wafile Word acceptor file (in DEAGL format version 2.2) camgeom An OOGL-format geometry description to represent the observer. geom An OOGL-format geometry description. Will replace the default Dirichlet domain computation. String-matching of key markers and attribute values is case-insensitive. Currently all matrices must be 4x4 real matrices. Hence the only valid dimensions are 2,3, or 4. The typical case is dimension 3 where there are projective models for hyperbolic, euclidean, and spherical geometry. Dimension 2 groups should leave the z-coordinate unchanged. Matrices are considered transposed if they are considered to act on column vectors as in: M.v = v'. This is the usual mathematical conven- tion convention. So, if you use this convention you must mark your matrices as being transposed. Group elements are specified by an optional character string followed by a list of 16 real numbers. For the case of generators, the char- acter string represents the name of that generator. Its main use is with the automatic group software: the name used here should match that of the generator in the word acceptor file. It should, for example, be a single character for the software to work reliably. For composite elements, the string is the word in the generators which describes this group element. OOGL libraries expect discrete group files to use the '.dgp' suffix. A file which describes the group of the three dimensional torus follows: DISCGRP (group 3torus ) (comment " This is a test of the new discrete group library. " ) (attribute Euclidean ) (display centercam ) (enumdepth 3 ) # look at all words of length 3 or less in generators (enumdist 10.0 ) # and which don't move the origin more than 10.0 (dimn 3 ) (ngens 3 ) (gens a 1 0 0 0 0 1 0 0 0 0 1 0 1 0 -0.1 1 b 1 0 0 0 0 1 0 0 0 0 1 0 0.1 1 0 1 c 1 0 0 0 0 1 0 0 0 0 1 0 0 0.2 1 1 ) (cpoint 0.000000 0.000000 0.000000 1.000000 ) (camgeom { = OFF 5 2 5 0 0 0 -0.1 0 0.5 0.1 0 0.5 0 -0.1 0.5 0 0.1 0.5 3 0 1 2 200 200 0 .8 3 0 3 4 0 200 200 .8 } ) FILES
Example group files are to be found in the OOGL release in ${GEOM}/data/groups, where e.g., GEOM = /u/gcg/ngrap. See also discgrp(3) and automata(1). AUTHORS
Charlie Gunn. BUGS
For dimension 2, the code should read and write 3 x 3 matrices. Date: 92/08/26 discgrp(5gv)
All times are GMT -4. The time now is 10:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy