Sponsored Content
Top Forums Shell Programming and Scripting Replace space by newline error Post 302952662 by kamijia83 on Thursday 20th of August 2015 04:34:19 PM
Old 08-20-2015
Thanks for the replies ! Will post the source data soon.
Space in front of the new line is not required
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

newline character, space and tab after a string

no problem (6 Replies)
Discussion started by: angelina
6 Replies

2. Shell Programming and Scripting

Breaking long lines into (characters, newline, space) groups

Hello, I am currently trying to edit an ldif file. The ldif specification states that a newline followed by a space indicates the subsequent line is a continuation of the line. So, in order to search and replace properly and edit the file, I open the file in textwrangler, search for "\r " and... (14 Replies)
Discussion started by: rowie718
14 Replies

3. Shell Programming and Scripting

replace >< with > newline <

Hi All, I have the command in PERL for performing this, but Can you please suggest me how can i perform this using AWK: My input xml file looks like this: <aaa>hello</aaa><bbb>hai</bbb> I want the output like this ( means need new line after end of each xml tag): <aaa>hello</aaa>... (1 Reply)
Discussion started by: HemaV
1 Replies

4. Shell Programming and Scripting

Using sed I want to replace space by newline

Input: -------------------------- 123asd 456sdasda 789a ------------------------- output wanted: --------------------- 123asd 456sdasda 789a ---------------------- I want this by sed in simple way please help (I know by: tr ' ' '\n' < inputfile )I want it by sed only (5 Replies)
Discussion started by: RahulJoshi
5 Replies

5. UNIX for Dummies Questions & Answers

Remove newline & space

Can someone help me on this. I have a file that has a long line just like below. The long line keeps on being truncated to the next line (new line + space) for some reason. Basically, I just need to remove this problem. Hope somebody can help! Thanks! INPUT FILE: structuralObjectClass:... (4 Replies)
Discussion started by: Orbix
4 Replies

6. Shell Programming and Scripting

Replace newline character between a double quotes to a space

Hi Guys, I have a file with content as below aj.txt "Iam allfine" abcdef abcd "all is not well" What I'm trying to say is my data has some new line characters in between quoted text. I must get ride of the newline character that comes in between the quoted text. output must be:... (8 Replies)
Discussion started by: ajahuja
8 Replies

7. Shell Programming and Scripting

Newline to space code removes 0 from the first line

I am having a peculiar problem. First I run the code below to append 0 at the start of each line in some hundreds of files that I have in a directory. These files have each word in a newline. for f in *.dat; do echo "0" > tmpfile cat $f >> tmpfile mv tmpfile $f done Then I run this... (7 Replies)
Discussion started by: shoaibjameel123
7 Replies

8. Shell Programming and Scripting

Replace 3rd occurance of SPACE with newline

I have file with SQL output as 0001 firstname1 lastname1 0002 firstname2 lastname2 0003 firstname3 lastname3 0004 firstname4 lastname4 Expected output : 0001 firstname1 lastname1 0002 firstname2 lastname2 0003 firstname3 lastname3 0004 firstname4 lastname4 Let me know if this can... (9 Replies)
Discussion started by: sameermohite
9 Replies

9. UNIX for Dummies Questions & Answers

Replace the unexpected newline char with space in a Fixed width file

Input eg: Ouput Expected. The #rd line had the unexpted new line, which need to be replaced with space. I was planing to go with checking the length of each line using awk and if the length is less than the defeined limit, (12 in above case) will replace the newline with space. ... (5 Replies)
Discussion started by: deepakwins
5 Replies

10. Programming

Concatenate integer and space/newline for cout in C++

I'm trying to print out integers and space/newline for a nicer output, for example, every 20 integers in a row with ternary operator. In C I could do it with:printf("%d%s",tmp_int, ((j+1)%20) ? "\t":"\n"); but could not figure out the equivalent in C++: cout << ((j+1)%20)?... (4 Replies)
Discussion started by: yifangt
4 Replies
Geo::Space(3pm) 					User Contributed Perl Documentation					   Geo::Space(3pm)

NAME
Geo::Space - A collection of various items INHERITANCE
Geo::Space is a Geo::Shape SYNOPSIS
my $island1 = Geo::Line->filled(...); my $island2 = Geo::Space->new(...); my $islands = Geo::Space->new($island1, $island2) DESCRIPTION
Where a Geo::Surface can only contains sets of nested polygons, the Space can contain anything you like: lines, points, and unrelated polygons. METHODS
Constructors $obj->new([COMPONENTS], [OPTIONS]) Geo::Space->new([COMPONENTS], [OPTIONS]) When called as instance method, some defaults are copied from the object where the call is made upon. Usually called as class method. COMPONENTS are Math::Polygon, Math::Polygon::Surface, Geo::Point, Geo::Line, Geo::Surface, Geo::Space objects. Option--Defined in--Default proj Geo::Shape see Geo::Proj::defaultProjection() . proj => LABEL Attributes $obj->component(INDEX, [INDEX, ...]) Returns the component (or components) with the specified INDEX(es). One Geo::Shape object in scalar context, and multiple in list context. $obj->components Returns a list of Geo::Shape objects, all located in this space. $obj->lines Returns a list of Geo::Line objects, which are defined as separate components. $obj->nrComponents Returns the number of components. $obj->onlyLines Returns true when all components are lines; Geo::Line objects. $obj->onlyPoints Returns true when all components are points; Geo::Point objects. $obj->onlyRings Returns true when all components are closed lines; Geo::Line objects each defined as ring. $obj->points Returns a list of Geo::Point objects, which are defined as separate components. $obj->proj See "Attributes" in Geo::Shape $obj->proj4 See "Attributes" in Geo::Shape Projections $obj->in(LABEL|'utm') See "Projections" in Geo::Shape $obj->projectOn(NICK, POINTS) See "Projections" in Geo::Shape Geometry $obj->area Returns the area enclosed by the combined components. Only useful when the points are in some orthogonal projection. $obj->bbox See "Geometry" in Geo::Shape $obj->bboxCenter See "Geometry" in Geo::Shape $obj->bboxRing([XMIN, YMIN, XMAX, YMAX, [PROJ]]) Geo::Space->bboxRing([XMIN, YMIN, XMAX, YMAX, [PROJ]]) See "Geometry" in Geo::Shape $obj->distance(OBJECT, [UNIT]) See "Geometry" in Geo::Shape $obj->perimeter The length of the outer polygons of all components. Only useful in a orthogonal coordinate systems. Display $obj->deg2dm(DEGREES, POS, NEG) Geo::Space->deg2dm(DEGREES, POS, NEG) See "Display" in Geo::Shape $obj->deg2dms(DEGREES, POS, NEG) Geo::Space->deg2dms(DEGREES, POS, NEG) See "Display" in Geo::Shape $obj->dms2deg(DMS) Geo::Space->dms2deg(DMS) See "Display" in Geo::Shape $obj->toString([PROJECTION]) Returns a string representation of the line, which is also used for stringification. example: DIAGNOSTICS
Error: distance calculation not implemented between a $kind and a $kind Only a subset of all objects can be used in the distance calculation. The limitation is purely caused by lack of time to implement this. Error: in() not implemented for a $class SEE ALSO
This module is part of Geo-Point distribution version 0.93, built on May 19, 2010. Website: http://perl.overmeer.net/geo/ All modules in this suite: "Geo::Point", "Geo::Proj4", "Geo::WKT", "Math::Polygon", "Geo::GML", "Geo::ISO19139", "Geo::EOP", "Geo::Format::Envisat", and "Geo::Format::Landsat". Please post questions or ideas to the mailinglist at http://geo-perl@list.hut.fi LICENSE
Copyrights 2005-2010 by Mark Overmeer. For other contributors see ChangeLog. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.14.2 2010-05-19 Geo::Space(3pm)
All times are GMT -4. The time now is 03:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy