Output will be as follows.
In this solution I have hardcoded 1st line of UC pmct1 pmNo2 pmNo3S As I haven't seen any where about UC in code. Kindly let us know if this helps.
EDIT: Adding a non-single liner form of same solution, you can make use it as a script as well.
Thanks,
R. Singh
Last edited by RavinderSingh13; 12-02-2014 at 11:25 AM..
Reason: Added non single liner code for same
This User Gave Thanks to RavinderSingh13 For This Post:
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)
Iam pretty new to UNIX and would like to convert a CSV to an XML file using AWK scripts. Can anybody suggest a solution? My CSV file looks something like this :
Serial No Growth% Annual % Commission % Unemployed %
1 35% 29% 59% 42%
2 61% ... (15 Replies)
Hi,
i am really fresh with shell scripting and programming,
i have an issue i am not able to solve to populate data on my server for Cisco IP phones.
I have CSV file within the following format:
;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;... (9 Replies)
Hi,
I want to write a perl script. Which should accept the xml file, one xsl file and the loaction. The perl script should process the xml file using the xsl file and puts the out put in specified location.
For example:
My.perl is perls cript.
my.xml
is like this
<?xml version="1.0"... (2 Replies)
Hi ,
Please any one to help on ,extract this xml code into csv columns list.
<SOURCEFIELD BUSINESSNAME ="" DATATYPE ="date" DESCRIPTION ="" FIELDNUMBER ="1"
FIELDPROPERTY ="0" FIELDTYPE ="ELEMITEM" HIDDEN ="NO" KEYTYPE ="NOT A KEY" LENGTH ="19"
LEVEL ="0" NAME ="BUSINESS_DATE"... (4 Replies)
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)
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)
Hello,
Does anyone know of a way to convert an .xml file (ONIX) to something more workable, like a .csv (or even .xls) file? Ideally something on the command line would be ideal, but not absolutely necessary. I would be dealing with .xml files of 125 MB+.
I am using XQuartz in El Capitan.
... (17 Replies)
Hello,
I have copied .xml code for a single item below. I am trying to extract three items (field indices*b244 (second occurrence), b203, and j151), so the desired output would be:
9780323013543 Manual of Natural Veterinary Medicine: Science and Tradition, 1e 68.95
A parallel solution,... (14 Replies)
Hello,
For i while i have been using XMLStarlet to convert several XML files to CSV files. So far this always went fine.
Today however i got a new XML format however but i cannot find out how to get the data i need.
Below is part of the code where it shows the different format. What... (10 Replies)
Discussion started by: SDohmen
10 Replies
LEARN ABOUT OSF1
makedbm
makedbm(8) System Manager's Manual makedbm(8)NAME
makedbm - Makes a Network Information Service (NIS) dbm file
SYNOPSIS
/var/yp/makedbm [-i yp_input_file] [-s yp_secure_name] [-a method] [-o yp_output_name] [-d yp_domain_name] [-m yp_master_name] infile out-
file
/var/yp/makedbm [-u dbmfilename]
OPTIONS
Specifies that NIS maps are to be stored in one of the following formats: btree -- Recommended when creating and maintaining very large
maps. dbm/ndbm -- For backward compatibility. This is the default. hash -- A potentially quicker method for managing small maps. Cre-
ates a special entry with the key yp_input_file. Creates a special entry with the key yp_secure_file. This causes the makedbm command to
write a secure map. The key value ypserver looks for YP_SECURE. Creates a special entry with the key yp_output_name. Creates a special
entry with the key yp_domain_name. Creates a special entry with the key yp_master_name. If no master host name is specified, yp_mas-
ter_name will be set to the local host name. Undoes a dbm file. That is, prints out a dbm file one entry per line, with a single space
separating keys from values.
DESCRIPTION
The makedbm command takes the file specified by the argument infile and converts it to a single file or a pair of files in dbm(3),
btree(3), or hash(3) format. The dbm(3) files are stored as outfile.pag and outfile.dir. The btree(3) files are stored as outfile.btree.
Each line of the input file is converted to a single dbm record. All characters up to the first tab or space form the key, and the rest of
the line is defined as the key's associated data. If a line ends with a backslash (), the data for that record is continued onto the next
line. It is left for the Network Information Service (NIS) clients to interpret the number sign (#); makedbm does not treat it as a comment
character. The infile parameter can be a hyphen (-), in which case makedbm reads the standard input.
The makedbm command is meant to be used in generating database files for NIS. The makedbm command generates a special entry with the key
yp_last_modified, which is the date of infile.
RESTRICTIONS
You must use the same database format for each map in a domain. In addition, a server serving multiple NIS domains must use the same data-
base format for all domains.
Although a Tru64 UNIX NIS server that takes advantage of btree files will be able to store very large maps, NIS slave servers that lack
this feature might have a much smaller limit on the number of map entries they can handle. It may not be possible to distribute very large
maps from a Tru64 UNIX NIS master server to a slave server that lacks support for very large maps. NIS clients are not affected by these
enhancements.
EXAMPLES
The following example shows how a combination of commands can be used to make the NIS dbm files passwd.byname.pag and passwd.byname.dir
from the /etc/passwd file. The percent sign (%) signifies the system prompt. % awk 'BEGIN { FS = ":"; OFS = " "; }
{ print $1, $0 }' /etc/passwd > ptmp % makedbm ptmp passwd.byname % rm ptmp
The awk command creates the file ptmp which is in a form usable by makedbm. The makedbm command uses the ptmp file to create the
database files. The rm command removes the ptmp file. The following is an example of the makedb command used with the btree format
database routine to store NIS maps. makedbm -a b ...
SEE ALSO
Commands: yppasswd(1), ypmake(8)
Functions: btree(3), dbm(3), dbopen(3), hash(3), ndbm(3)makedbm(8)