Sponsored Content
Top Forums Shell Programming and Scripting Add white space to the end of a line with sed Post 302131169 by Shell_Life on Thursday 9th of August 2007 11:25:35 AM
Old 08-09-2007
The '$' is not a physical character, but a representation of end of line.

Similar for '^' that represents the start of the line.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

SED with White Space

Dear Members, Suppose i have a variable test which stores a string as below: test='John drives+++++++++a+++++car' now i want to use sed on the above variable and replace + with a white space, so that i get echo $test should give me 'john drives a car' Between... (1 Reply)
Discussion started by: sandeep_1105
1 Replies

2. Shell Programming and Scripting

Want to use sed to add some parameters at the end of the line

Hello All, I have a doubt in sed, i want to add some parameter at the end of the tag inside a xml tag. how to i do that. so i want to add Results="true" value="high" inside the xml tag. Orignal <execute description="reboot"> <execute description="Stop Servlet"> After adding the... (5 Replies)
Discussion started by: asirohi
5 Replies

3. Shell Programming and Scripting

sed : replace space and end-of-line

Hi ! I'm rather new with sed ... learned a lot already by googling etc ... The following script should replace all spaces and ends-of-lines with "something (see below). #!/bin/bash i=0 while read line do fam="H`printf "%06d" $i`" echo $line | sed -e 's//\t'$fam'\n/g' i=$(($i+1))... (7 Replies)
Discussion started by: jossojjos
7 Replies

4. Shell Programming and Scripting

sed + white space

Hi, What sed command (if sed is the right command) can remove ALL white space from my file. I have a csv, except I want to remove all white space between commas and characters. My idea (without testing) sed 's/ //g' Is there a better way? (18 Replies)
Discussion started by: mcclunyboy
18 Replies

5. Shell Programming and Scripting

Delete white space using sed

Hi , I have a file with contents as below group1 = aaaaa, bbbbb, ccccc, aaa group2=aaa, bbbbb, ccccc, aaaaa group3 = bbbbb, aaa, ccccc, aaaaa group4 = bbbbb, aaa,ccccc, aaaaa I want to search for "aaa" and the output should be as below group1 = aaaaa, bbbbb, ccccc group2= bbbbb, ccccc,... (3 Replies)
Discussion started by: anil8103
3 Replies

6. Shell Programming and Scripting

How to Add space at the end of each line in linux

hi,. I am writing a small script in csh... Can any one tel me how to add space at end of each line in a file (9 Replies)
Discussion started by: Manju87
9 Replies

7. UNIX for Dummies Questions & Answers

sed - Add a variable line to the end of a block beginning with a regex

Hi, Need some help with sed. I have a file that has sections : e.g. a=blah b=blah d=blah e=blah There's many sections in the file. (1 Reply)
Discussion started by: andyatit
1 Replies

8. Shell Programming and Scripting

How to add a line to the end of a set of files without using sed command?

I understand that the SED command reads all the lines in the file before adding a required line to the end of the file. Is there another command that adds a line to the end of files without reading the entire file.... SED is increasing the processing time as the number of lines in each of the... (1 Reply)
Discussion started by: Kanch
1 Replies

9. Shell Programming and Scripting

Add white space

hi guys how can i add spacein file name with sed if strings have no space around dash input 19-20 ( 18-19 ) ABC-EFG output after add white space 19 - 20 (18 - 19 ) ABC - EFG thx in advance (2 Replies)
Discussion started by: mhs
2 Replies

10. Shell Programming and Scripting

Putting white Space at the end of the string

Hi Guys, Hope, you all are doing good out there. I am writing a shell script and currrint in need of your help. This is what I need to do; I have position based plain file. One of the fields is 15 character long. I need to fill that field. The problem is that the value is dynamic, it could... (4 Replies)
Discussion started by: singh.chandan18
4 Replies
Geometry::Primitive::Line(3pm)				User Contributed Perl Documentation			    Geometry::Primitive::Line(3pm)

NAME
Geometry::Primitive::Line - A Line DESCRIPTION
Geometry::Primitive::Line represents a straight curve defined by two points. SYNOPSIS
use Geometry::Primitive::Line; my $line = Geometry::Primitive::Line->new(); $line->start($point1); $line->end($point2); ATTRIBUTES
end Set/Get the end point of the line. start Set/Get the start point of the line. METHODS
new Creates a new Geometry::Primitive::Line contains_point Returns true if the supplied point is 'on' the line. Accepts either a point object or an x y pair. grow Does nothing, as I'm not sure how. Patches or hints welcome. is_parallel ($other_line) Returns true if the supplied line is parallel to this one. is_perpendicular ($other_line) Returns true if the supplied line is perpendicular to this one. length Get the length of the line. point_end Get the end point. Provided for Shape role. point_start Get the start point. Provided for Shape role. scale Does nothing at the moment. slope Get the slope of the line. to_string Guess! y_intercept Returns the Y intercept of this line. AUTHOR
Cory Watson <gphat@cpan.org> COPYRIGHT &; LICENSE You can redistribute and/or modify this code under the same terms as Perl itself. perl v5.10.1 2010-01-10 Geometry::Primitive::Line(3pm)
All times are GMT -4. The time now is 07:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy