05-10-2011
Hey murphy...thanks for the XSL sheet. This XSL stylesheet does the same thing but i need to run these scripts on some servers so they need to be Shell. But cz of ur post i gotta knw few more things about XML and XSL. Thanks fr ur time
---------- Post updated at 08:46 AM ---------- Previous update was at 08:26 AM ----------
@ctsgnb...ur code really worked but i'm not getting the output in new lines...everything is being displayed horizontally in a single line.
---------- Post updated at 08:51 AM ---------- Previous update was at 08:46 AM ----------
@ ahamed....accept my mistake. Did u try this code that u posted last? I tried it..got no output
---------- Post updated at 03:17 PM ---------- Previous update was at 08:51 AM ----------
@ctsgnb:
# sed "s/<[^>]*>/#/g;s/##*/\n/g" tst.xml
n13-WY-8425-2
nWY84252
nF
n0005
n13
n04/12/2012
n282.00
n131533
nDAN CUTHBERT
n(847)228-6620
nN
nN
n01
n001
n20090824
n0615882
nPRIOVOLOS, TASOS & SOFIA
n18214 S SPRING MEADOWS DR
nN
nN
n
look at these "n"....tried hard but cud'nt locate the reason for these and also the o/p's in a single line...m using sun 5.10..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Am new to scripting. :)
Am trying to figure out whether can i use bash scripting to parse an xml file.
Parsing is not just pulling out information according to the pattern but its more of a generic parsing. I should identify the xml hierarchy and pull out information accordingly. It's not a... (2 Replies)
Discussion started by: karthikvela
2 Replies
2. Shell Programming and Scripting
Hello,
I'm a starting shell scripter and no Perl knowledge. I've trying to do this for a while:
I want to parse an XML file and get certain data out of it and write that data into a CSV file, all this using Shell Scripting (in Bash). Or Perl without any XML Parser/Interpreter (if possible).
... (1 Reply)
Discussion started by: Kage Musha
1 Replies
3. Shell Programming and Scripting
Below is a XML I have...
<?xml version="1.0" encoding="UTF-8" ?>
<component
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:XXXXX-www-Install-Manifest manifest.xsd"
xmlns="urn:qqqqq-Install-Manifest"
name="OM"
... (1 Reply)
Discussion started by: dashok.83
1 Replies
4. Shell Programming and Scripting
Please help me to create a shell script that can parse the below XML and send a string back adding all XML values.:)
<RequestBillsRsp... (1 Reply)
Discussion started by: xtatic
1 Replies
5. Shell Programming and Scripting
I have a xml file like this
<bul:collectionStrategy name="strategy1">
<bul:collectionTemplateGroup name="15min group"/>
<bul:collectionTemplateGroup name="hourly group"/>
</bul:collectionStrategy>
<bul:CollectionTemplateGroup name="hourly group" >
... (2 Replies)
Discussion started by: LavanyaP
2 Replies
6. Shell Programming and Scripting
Hi folks,
Need some help with XML to text file parsing , the following is the content of the XML File.
<xn:SubNetwork id="SNJNPRZDCR0R03">
<xn:MeContext id="PRSJU0005">
<xn:VsDataContainer id="PRSJU0005">
<xn:attributes>
... (6 Replies)
Discussion started by: tech_frk
6 Replies
7. Shell Programming and Scripting
Well, issue is i have to parse this script to get the VERSION:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleAllowMixedLocalizations</key>
... (9 Replies)
Discussion started by: zorosinister
9 Replies
8. Solaris
Hi,
I want to parse an XML File using Shell Script preferably by using awk command,
I/P file is :
<gn:ExternalGsmCell id="016P3A">
<gn:attributes>
<gn:mnc>410</gn:mnc>
<gn:mcc>310</gn:mcc>
<gn:lac>8016</gn:lac>
... (2 Replies)
Discussion started by: tech_frk
2 Replies
9. Shell Programming and Scripting
HI Guys,
I have to parse below xml file :-
<xn:SubNetwork id="ONRM_ROOT_MO_R">
<xn:MeContext id="LP101">
<xn:ManagedElement id="1">
<xn:VsDataContainer id="1">
<xn:attributes>
... (8 Replies)
Discussion started by: asavaliya
8 Replies
10. Shell Programming and Scripting
Hi ,
I have data as below in a text file
{
'AAA' => {
'A1' => 'a1 comment',
'A2' => 'a2 comment'
},
'BBB' => {
'B1' => 'b1 comment'
},
'CCC' => {
'C1' => 'c1 comment',
'C2' => 'c2 comment',
'C3' => 'c3 comment'
'C4' => 'c4... (2 Replies)
Discussion started by: vivek d r
2 Replies
LEARN ABOUT PHP
set_color
set_color(1) fish set_color(1)
NAME
set_color - set_color - set the terminal color
set_color - set the terminal color
Synopsis
set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR]
Description
Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple,
cyan, white and normal.
o -b, --background Set the background color
o -c, --print-colors Prints a list of all valid color names
o -h, --help Display help message and exit
o -o, --bold Set bold or extra bright mode
o -u, --underline Set underlined mode
o -v, --version Display version and exit
Calling set_color normal will set the terminal color to whatever is the default color of the terminal.
Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey
font color, while set_color --bold white will result in a white font color.
Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator.
set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and
incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of
ncurses and recompile fish against it in order to fix this issue.
Version 1.23.1 Sun Jan 8 2012 set_color(1)