Plz Help To convert xml file to text file using bourn shell scripts


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Plz Help To convert xml file to text file using bourn shell scripts
# 1  
Old 11-09-2005
Plz Help To convert xml file to text file using bourn shell scripts

If someone out there could help me out with this problem. I would really appreciate it.

I am trying to convert xml into text file(fixed length) using Unix Borne shell scripts.

My xml file:

<root>

<header_rec recordtype="00">
<record_id>00</record_id>
<country_code>AK></country_code>
</header_rec>

<detail_rec recordtype="01">
<record_id_01>01</drecord_id>
<country_code_01>AK</country_code>
</detail_rec>

<detail_rec rectyp_2="10">
<record_id>10</record_id>
<country_code>AK</country_code>
<fax>4567677</fax>
</detail_rec>

<trailer_rec recordtype="99">
<record_id>99</record_id>
</trailer_rec>

</root>





My File Test.txt


00AK112005-08-15 (record type=00)(fixed lengths -->recordid:1-2 -->countrycode:5-7


012005-65AK2005-08-15 (record type=01)
012005-65AK2005-08-15 (record type=01)
012005-65AK2005-08-15 (record type=02)
012005-65AK2005-08-15 (record type=02)

99AK11392005-08-+0000424 (record type=99))




I can't use whitespace as a delimiter.


Thanks you guys very much,
I really appreciate it.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

How to write in other language in text/xml file by reading english text/xml file using C++?

Hello Team, I have 2 files.one contains english text and another contains Japanese. so i have to read english text and replace the text with Japanesh text in third file. Basically, I need a help to write japanese language in text/xml file.I heard wstring does this.Not sure how do i write... (2 Replies)
Discussion started by: SA_Palani
2 Replies

2. Shell Programming and Scripting

Read csv file, convert the data and make one text file in UNIX shell scripting

I have input data looks like this which is a part of a csv file 7,1265,76548,"0102:04" 8,1266,76545,"0112:04" I need to make the output data should look like this and the output data will be part of text file: 7|1265000 |7654899 |A| 8|12660000 |76545999 |B| The logic behind the... (6 Replies)
Discussion started by: RJG
6 Replies

3. Shell Programming and Scripting

Need help to write a shell script to convert text file to excel file.

Hi Everyone, I want your help to write a script which will take text file as input and on the basis of delimiter ":"script will create excel sheet. Example input: IpAdress:InstanceName:Port:ServerName 10.255.255.1:abc:2232:xyz_abc Output should be an excel sheet like below: Column... (8 Replies)
Discussion started by: akabhinav18
8 Replies

4. UNIX for Dummies Questions & Answers

Reading XML file and print the values in the text file using Linux shell script

hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file <sequence> <Filename>aldorzum.doc</Filename> <DivisionCode>US</DivisionCode> <ContentType>Template</ContentType> <ProductCode>VIMZIM</ProductCode> </sequence>... (1 Reply)
Discussion started by: sravanreddy
1 Replies

5. Shell Programming and Scripting

How to convert xml file to text file?

Hi Everyone, I want to convert 1 xml file to text file.... Please help in the xml file i have 4 columns.... Thanks a lot in advance. Nilesh (6 Replies)
Discussion started by: nileshbhawsar
6 Replies

6. Shell Programming and Scripting

Convert XML to Data File in Shell Script

Hi All, I will be getting a huge XML file with a lot of records in it. I need to convert it into multiple data files. SAMPLE XML FILE <ABSProductCatalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <ProductSalesHierachy> - <Portfolios> - <Portfolio productCode="P1"> ... (8 Replies)
Discussion started by: ragha81
8 Replies

7. Shell Programming and Scripting

Convert XML file into TEXT file using PERL seript

Dear Yogesh..."Convert XML file into TEXT file using PERL seript"... can u help me regarding this issue...plz Thanks Rudro (0 Replies)
Discussion started by: Rudro
0 Replies

8. Shell Programming and Scripting

convert XML file into Text file(fixed length)

If someone out there could help me out with this problem. I would really appreciate it. I am trying to convert xml into text file(fixed length) using Unix Borne shell scripts. My xml file: <root> <header_rec recordtype="00"> <record_id>00</record_id> ... (0 Replies)
Discussion started by: ram2s2001
0 Replies

9. Shell Programming and Scripting

Converting Text File into XML using Unix Shell Scripts

Hi everyone, If someone out there could help me out with this problem. I would really appreciate it. I am trying to convert a file into xml format using Unix shell scripts. The file has fields with each field having a certain number of bytes, but the fields are not delimited by anything... (10 Replies)
Discussion started by: Laud12345
10 Replies
Login or Register to Ask a Question
EVTEST-CAPTURE(1)														 EVTEST-CAPTURE(1)

NAME
evtest-capture - Input device event capture program SYNOPSIS
evtest-capture "/dev/input/eventX" [evtest-capture.xml] DESCRIPTION
evtest-capture captures the information and events from the input device specified on the command line and writes it to the xml file given. If no filename is given for the output file, evtest-capture.xml is chosen as default. evtest-capture needs to be able to read from the device; in most cases this means it must be run as root. Together with with evtest-create-device.xsl, a simple uinput-based software input device can be created that replays the events as if the same input was performed on the physical device. This can be useful to replicate bugs with input devices in upper layers of the stack. To convert evtest-capture.xml into such a uinput device, run: xsltproc evtest-create-device.xls evtest-capture.xml > mydevice.c gcc -o mydevice mydevice.c ./mydevice DIAGNOSTICS
If evtest-capture does not see any events even though the device is being used, the device may be grabbed by a process (EVIOCGRAB). This is usually the case when debugging a synaptics device from within X. VT switching to a TTY or shutting down the X server terminates this grab and synaptics devices can be debugged. SEE ALSO
evtest(1) AUTHOR
evtest-capture was written by Peter Hutterer <peter.hutterer@redhat.com[1]>. NOTES
1. peter.hutterer@redhat.com mailto:peter.hutterer@redhat.com 05/21/2012 EVTEST-CAPTURE(1)