Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Help to join separate lines in a single one from xml file

Shell Programming and Scripting


Tags
join, parse, xml

Reply    
 
Thread Tools Search this Thread Display Modes
    #8  
Old Unix and Linux 02-24-2018   -   Original Discussion by Ophiuchus
RudiC's Unix or Linux Image
RudiC RudiC is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 22 May 2018, 5:11 PM EDT
Location: Aachen, Germany
Posts: 12,727
Thanks: 413
Thanked 3,912 Times in 3,598 Posts
Hmmm ... strange. Identical to what I get. Try again either proposdal in post#4 after dropping the ^\t| from the gsub regex.

Last edited by RudiC; 02-24-2018 at 03:46 PM..
Sponsored Links
    #9  
Old Unix and Linux 02-25-2018   -   Original Discussion by Ophiuchus
Ophiuchus's Unix or Linux Image
Ophiuchus Ophiuchus is offline
Registered User
 
Join Date: Oct 2011
Last Activity: 18 May 2018, 4:38 AM EDT
Posts: 286
Thanks: 50
Thanked 2 Times in 2 Posts
Hi RudiC,

Thank you.

I discovered why the output differs. The line ending of the file is CRLF since I´m working on Windows. I changed the line ending to LF and the output is the same as yours.
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Splitting a single xml file into multiple xml files Narendra921631 Shell Programming and Scripting 3 03-03-2016 02:50 PM
How to generate one long column by merging two separate two columns in a single file? forevertl UNIX for Dummies Questions & Answers 4 01-11-2014 12:30 AM
How to separate a single column file into files of the same size (i.e. number of rows)? evelibertine UNIX for Dummies Questions & Answers 2 02-02-2012 04:12 PM
Join in a single line variable number of lines cgkmal Shell Programming and Scripting 4 08-03-2009 06:52 AM
Separate lines in a single '|' separated line hidnana Shell Programming and Scripting 3 03-17-2008 10:16 AM



All times are GMT -4. The time now is 07:18 PM.