Sponsored Content
Top Forums Shell Programming and Scripting Convert XML to CSV using awk or shell script Post 302931510 by drl on Tuesday 13th of January 2015 12:29:40 PM
Old 01-13-2015
Hi.
Quote:
Originally Posted by Corona688
Something that doesn't require root access to deal with. Something that you can expect to work dependably. You might as well have asked him to install a third-party utility.
I keep a number of perl modules local to my home, not requiring the package manager. I generally don't put anything into /bin, /user/bin, etc., unless it is in the repositories. For many other things that may need to be accessible (say for loading, linking), I use my library directory:
Code:
$ ls ~/lib
perl/  python/	readme.txt  tcl/

and:
Code:
/home/drl/lib/perl/		|-- RegExp
|-- Acme			|-- Rmyegexp
|-- Algorithms			|-- Sample.pm
|-- App				|-- Sort
|-- Array			|-- String
|-- Data			|-- T2t
|-- Date			|-- Tabs.pl
|-- DateTime			|-- Term
|-- Excel			|-- Text
|-- File			|-- Version
|-- Getopt			|-- backup
|-- HTML			|-- cva.pm
|-- IO				|-- lib.pm
|-- Lingua			|-- nposw.pl
|-- Math			|-- old-T2t
|-- Module			|-- parse_csv.pl
|-- MyWrap.pl			|-- pqs.pl
|-- Pod				|-- prutil.pl
|-- RCS				`-- yinfo.pl
|-- Random			28 directories, 10 files

This seems somewhat off-topic here, so we could continue this elsewhere if useful ... cheers, drl
This User Gave Thanks to drl For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sample Unix script file to convert .xml to .csv

Dear all, Can you send me a script file the changes .xml to .csv file. Thanks, Srinivasa (4 Replies)
Discussion started by: srinivasaphani
4 Replies

2. Shell Programming and Scripting

Help to convert XML to CSV

Apologies if this has already been covered in this site somewhere, I did try looking but without any success. I am new to the whole XML thing, very late starter, and have a requirement to convert an XML fiule to a CSV fomat. I am crrently working on a Solaris OS. Does anyone have any suggestions,... (2 Replies)
Discussion started by: rossingi_33
2 Replies

3. Shell Programming and Scripting

convert this into csv using awk/shell script

Hi Scripting gurus, I need to convert following text snippet into csv. please help Input heading1 = data1 heading2 = data2 .. .. heading n = data n heading 1 = data1 .. .. Output data1,data2,....,data n (3 Replies)
Discussion started by: azs0309
3 Replies

4. Shell Programming and Scripting

Convert XML to CSV format

Can any one give the idea on this, please. I have the following XML file and wants to convert into CSV(comma separated value) format. <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'> <Waveset> <Object name='ra8736'> <Attribute name='ADDRESS'... (2 Replies)
Discussion started by: kumar04
2 Replies

5. Shell Programming and Scripting

Awk script to convert csv to html

Hi Written some script to convert csv to html but could not add table headers.Below are the errors iam getting ./csv2html | more + awk -v border=1 -v width=10 -v bgcolor=black -v fgcolor=white BEGIN { printf("<table border=\"%d\" bordercolor=\"%s\" width=\"%d\"... (2 Replies)
Discussion started by: zeebala1981
2 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

awk convert xml to csv

Hi, I have an xml file and I want to convert it with awk in to a csv file Test.xml <Worksheet ss:Name="Map1"> <Table ss:ExpandedColumnCount="2" ss:ExpandedRowCount="2" x:FullColumns="1" x:FullRows="1" ss:DefaultColumnWidth="60"> <Row> <Cell><Data... (6 Replies)
Discussion started by: research3
6 Replies

8. Shell Programming and Scripting

Convert xml to csv

I need to convert below xml code to csv. I searched other posts as well but this post (_https://www.unix.com/shell-programming-scripting/174417-extract-parse-xml-data-statistic-value-csv.html) gives "sed command garbled" error. As of now I have written a long script to do it, but can it be done with... (7 Replies)
Discussion started by: dineshydv
7 Replies

9. Shell Programming and Scripting

How to convert xml to csv ?

I am in need of converting billions of XML into csv file to load data to DB, i have found the below code in perl but not sure why it's not working properly. CODE: #!/usr/bin/perl # Script to illustrate how to parse a simple XML file # and pick out all the values for a specific element, in... (1 Reply)
Discussion started by: rspwilliam
1 Replies

10. Shell Programming and Scripting

Covert xml to csv using xsltproc in shell script

Hi, I am not familiar with shell scripting. Please help to convert xml files to csv files using xsltproc command in bash script. Find the xml sample <?xml version="1.0"?> -<Source xmlns="link"> <CompanyCd>DSP</CompanyCd> <SrcSysCd>DSPS</SrcSysCd> <CountryCd>45</CountryCd> ... (2 Replies)
Discussion started by: mathina
2 Replies
Module::Install::ReadmeFromPod(3pm)			User Contributed Perl Documentation		       Module::Install::ReadmeFromPod(3pm)

NAME
Module::Install::ReadmeFromPod - A Module::Install extension to automatically convert POD to a README SYNOPSIS
# In Makefile.PL use inc::Module::Install; author 'Vestan Pants'; license 'perl'; readme_from 'lib/Some/Module.pm'; readme_from 'lib/Some/Module.pm', { clean => 1, format => 'htm', output_file => 'SomeModule.html' }; A "README" file will be generated from the POD of the indicated module file. Note that the author will need to make sure "Module::Install::ReadmeFromPod" is installed before running the "Makefile.PL". (The extension will be bundled into the user-side distribution). DESCRIPTION
Module::Install::ReadmeFromPod is a Module::Install extension that generates a "README" file automatically from an indicated file containing POD, whenever the author runs "Makefile.PL". Several output formats are supported: plain-text, HTML, PDF or manpage. COMMANDS
This plugin adds the following Module::Install command: "readme_from" Does nothing on the user-side. On the author-side it will generate a "README" file. readme_from 'lib/Some/Module.pm'; If a second parameter is set to a true value then the "README" will be removed at "make distclean". readme_from 'lib/Some/Module.pm', 1; A third parameter can be used to determine the format of the "README" file. readme_from 'lib/Some/Module.pm', 1, 'htm'; Valid formats for this third parameter are: txt, text Produce a plain-text "README" file using Pod::Text. The 'txt' format is the default. htm, html Produce an HTML "README.htm" file using Pod::Html. man Produce a "README.1" manpage using Pod::Man. pdf Produce a PDF "README.pdf" file with App::pod2pdf if this module is installed. A fourth parameter can be used to supply an output filename. readme_from 'lib/Some/Module.pm', 0, 'pdf', 'SomeModule.pdf'; Finally, you can pass additional arguments to the POD formatter that handles the requested format. my @options = ( 'release' => 1.03, 'section' => 8 ); # options for Pod::Man readme_from 'lib/Some/Module.pm', 1, 'man', undef, @options; But instead of passing this long list of optional arguments to readme_from, you should probably pass these arguments as a named hashref for clarity. my @options = ( 'release' => 1.03, 'section' => 8 ); readme_from 'lib/Some/Module.pm', {clean => 1, format => 'man', output_file => undef, options => @options}; If you use the "all_from" command, "readme_from" will default to that value. all_from 'lib/Some/Module.pm'; readme_from; # Create README from lib/Some/Module.pm readme_from '','clean'; # Put a empty string before 'clean' AUTHOR
Chris "BinGOs" Williams LICENSE
Copyright X Chris Williams This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details. SEE ALSO
Module::Install Pod::Text Pod::Html Pod::Man App::pod2pdf perl v5.14.2 2012-02-25 Module::Install::ReadmeFromPod(3pm)
All times are GMT -4. The time now is 04:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy