Parsing XML (and insert data) then output data (bash / Solaris)
Hi folks
I have a script I wrote that basically parses a bunch of config and xml files works out were to add in the new content then spits out the data into a new file.
It all works - apart from the xml and config file format in the new file
with XML files the original XML (that ends up in the destination file)
but it should look like this (this is the new stuff I am inserting)
on config files - which are just standard flat files,the original file looks like this:
but I get this:
I use the same function for each file - the content is spot on I just cannot see how to get the xml formatting correct (the non-xml files I can live with) and looks like this :
$insertThis is the text I need to insert
$insertAtLine is the line I need to insert the text at
$dFile = destination file
$tFile = temporary file
so, basically
works, and
this is whats giving me grief!
Experts ,
Below is the data:
--- Physical volumes ---
PV Name /dev/dsk/c1t2d0
VG Name /dev/vg00
PV Status available
Allocatable yes
VGDA 2
Cur LV 8
PE Size (Mbytes) 8
Total PE 4350
Free PE 2036
Allocated PE 2314
Stale PE 0
IO Timeout (Seconds) default
--- Physical volumes ---... (5 Replies)
Hi,
I have an XML file in Linux and it contains a long string of characters. The last part of the file is like
.......
.......
.......
CAD</MarketDescription></InvestorTransaction></AdvisorAccount></DivisionAdvisor></Division>... (3 Replies)
Hi All,
I was wondering how I can convert each line in an input file where fields are separated by variable width spaces into a CSV file. Below is the scenario what I am looking for.
My Input data in inputfile.txt
19 15657 15685 Sr2dReader 107.88 105.51... (4 Replies)
hi,
I need to create a bash shell script which picks up data from a text file and in the output file puts it into an html made table. I have to use sed and awk utilties to do this
the input text file will contain data in the format:
job name para1 para2 para3 para4 para4
1 ... (1 Reply)
Created a korn shell script, everything is is working except this section, the variable $SYSINFO is being set, but the NASIP & NASDEV are failing, it appears to be treating the config.xml file config directory and xml as the file. Need a second set of eyes to tell me where I am messing up.
#... (3 Replies)
Hi people,
I am writing a korn shell script, and one of the command gives an output something like below:
release.label.2010.03.02
objects:
/project/path/to/some/file_name.ksh
/project/path/another/file_name01.dat
I have to retrieve the file paths one by one & use them as... (9 Replies)
Hi
Is it possible to parse a posted xml data from a remote server in unix shell script. if so how to do that? and i need to give this script path in the push url (in remote server) . how to do this?
I have tried this in asp but could not succeed....so am trying in shell scripting...the thread... (1 Reply)
Hi All,
I have a xml file for example as described below
<xml>
<address>
<street><street>
<address/>
<isbn>426728783932020308393930303</isbn>
<book>
<name>
</name>
</book>
.
.
.
</xml>
My problem is to get the isbn number from the above described file using ksh script. Could... (6 Replies)
I am trying to use a line of output in an XML file as input in another new XML file for processing purposes via a shell script. Since I am a newbie though, I'm not sure how to do this since the data is different everytime. I am using this technique with static data right now:
echo -n "Running... (5 Replies)