The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Issue with Removing Carriage Return (^M) in delimited file sirahc UNIX for Advanced & Expert Users 7 03-25-2008 05:08 AM
add carriage return at end of file HAA Shell Programming and Scripting 2 11-20-2007 11:58 AM
Carriage Return at end of file bd_joy Shell Programming and Scripting 14 10-20-2006 01:20 PM
Removing Carriage Return and or line feed from a file tbone231 Shell Programming and Scripting 1 02-18-2005 04:37 PM
Removing carriage return characters from file b1saini UNIX for Dummies Questions & Answers 3 09-10-2003 09:41 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-23-2008
dasj22 dasj22 is offline
Registered User
  
 

Join Date: May 2008
Posts: 3
Lightbulb Padding Carriage return to the end of XML file

Hi All,
I am getting a xml file where the first field contains a carriage return and the all other fields doesnot contains any carriage return. So all the other records comes in the second line.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:iSeriesCspIntegration xmlns:ns0="http://www.ABC.com/xmlschema/cspintegration/"><header><flow>ACTRSP</flow><sender name="PQR"></sender><receiver name="CspHost"></receiver><generationDate>20080522-133152</generationDate>


So, basically i want to put a carriage return at the end of each closeing tag.
like this:

<?xml version="1.0" encoding="UTF-8"?> ["carriage return" ]
<ns0:iSeriesCspIntegration xmlns:ns0="http://www.ABC.com/xmlschema/cspintegration/"> ["carriage return" ]
<header> ["carriage return" ]
<flow>ACTRSP</flow> ["carriage return" ]
<sender name="PQR"></sender> ["carriage return" ]

can this be done in unix script.
please let me know the code that need to written for this.
  #2 (permalink)  
Old 05-23-2008
nua7 nua7 is offline
Registered User
  
 

Join Date: Mar 2008
Location: /bin/sh
Posts: 353
Do you mean "line-feed"or "carriage-return"?

this will append a newline...

Code:
echo >>file
Does this solve the problem..?
  #3 (permalink)  
Old 05-23-2008
dasj22 dasj22 is offline
Registered User
  
 

Join Date: May 2008
Posts: 3
reply

NO it does not solve my problem..
I have already tried with this..
  #4 (permalink)  
Old 05-23-2008
dasj22 dasj22 is offline
Registered User
  
 

Join Date: May 2008
Posts: 3
dasj22

I want a carriage return,,
not a line feed.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:25 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0