![]() |
|
|
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 |
| Business-IT Alignment | iBot | Cartoons for Geeks | 0 | 02-28-2009 10:40 AM |
| VI paste out of alignment | dlam | UNIX for Dummies Questions & Answers | 4 | 09-05-2008 09:59 AM |
| alignment of variable | manas_ranjan | Shell Programming and Scripting | 2 | 06-16-2008 08:08 AM |
| Column Alignment | nikncha | UNIX for Dummies Questions & Answers | 3 | 12-07-2006 10:20 PM |
| alignment in shell script | krishna | UNIX for Advanced & Expert Users | 1 | 09-10-2001 09:09 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
alignment
Hi, I am having a file with with format. however, for longer xml, the xml code has been truncated like this. Code:
F1 |###################### |String1 |<XML><REQ><MSGTYPE>DBDIRECT</MSGTYPE><SYNC>0</SYNC><CLIENT>C11</CLIENT>NAME=MYNAME|JOB=MYJOB|
| | |LOCATION=MYLOC|COUNTRY=MYCON|TECHNOLOGY
| | |=XML</REQ></XML>
I want to make complete xml string. output: Code:
F1 |###################### |String1 |<XML><REQ><MSGTYPE>DBDIRECT</MSGTYPE><SYNC>0</SYNC><CLIENT>C11</CLIENT>NAME=MYNAME|JOB=MYJOB|LOCATION=MYLOC|COUNTRY=MYCON|TECHNOLOGY=XML</REQ></XML> because, I am using below command to fetch the xml code from the above file Code:
sed -n '/<XML>.*<\/XML>/ s/.*\(<XML>.*<\/XML>\).*/\1/p' file and it is failing for the above records. is it possible to format the file like above, or is there way to get only xml code from the file? note: I can't use awk since it exceeds the record limit and i dont have gawk. Thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|