![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sed remove last 10 characters of a line start from 3rd line | minifish | Shell Programming and Scripting | 7 | 03-26-2008 04:42 PM |
| Newbie ? Need Help with If/Then & Line Breaks... | kthatch | UNIX for Dummies Questions & Answers | 1 | 05-01-2007 07:44 PM |
| How to remove page breaks from a flat file??? | kumarsaravana_s | Shell Programming and Scripting | 5 | 04-17-2007 08:51 AM |
| Removing line breaks from a shell variable | lyonsd | Shell Programming and Scripting | 5 | 09-12-2006 01:42 PM |
| Remove header(first line) and trailer(last line) in ANY given file | madhunk | Shell Programming and Scripting | 2 | 03-13-2006 03:36 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
any better way to remove line breaks
Hi,
I got some log files which print the whole xml message in separate lines: e.g. 2008-10-01 14:21:44,561 INFO do something 2008-10-01 14:21:44,561 INFO print xml : <?xml version="1.0" encoding="UTF-8"?> <a> <b>my data</b> </a> 2008-10-01 14:21:44,563 INFO do something again I want to convert the xml part into one single line, e.g. 2008-10-01 14:21:44,561 INFO do something 2008-10-01 14:21:44,561 INFO print xml : <?xml version="1.0" encoding="UTF-8"?><a><b>my data</b></a> 2008-10-01 14:21:44,563 INFO do something again I once got a script like: gzip -dc log.gz | sed -n -e ":a" -e "$ s/>\n/>/gp;N;b a" but it's very slow and run into out of memory is there any better way to do achieve it? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|