12-05-2009
Please post a sample xml file and highlight the value you want to change.
Your way look too complicated.
Check if you have XMLStarlet Toolkit available in your system.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to write a shell script designed to take input line by line by line from a file with a word on each line for editing with sed. Example file:
1.ejverything
2.bllown
3.maikling
4.manegement
5.existjing
6.systems
My design currently takes input from the user, and... (2 Replies)
Discussion started by: mkfitzwilliams
2 Replies
2. Shell Programming and Scripting
hi ,
i m having a html file and this file looks like this
<ssl>
<name>PIA</name>
<enabled>true</enabled>
<listen-port>39370</listen-port>
</ssl>
<log>
<name>PIA</name>
</log>
<execute-queue>
<name>weblogic.kernel.Default</name>
... (7 Replies)
Discussion started by: becksram123
7 Replies
3. Shell Programming and Scripting
Hi All,
I have xml file,i am tring to use awk to search pattern as: <Password>x</Password>
and Replace with:
<Password>y</Password>
please any one can help to solve this using awk and awk only. (4 Replies)
Discussion started by: islam2666
4 Replies
4. Shell Programming and Scripting
Search and Replace a string pattern with empty in an xml file in unix:
My xml file would be like this :
<Accounts><Name>Harish</Name><mobile>90844444444444445999 </mobile><TRIG>srcujim-1</TRIG></Accounts><Accounts><Name>Satish</Name><mobile>908999</mobile><TRIG>ettertrtt-1</TRIG></Accounts>
... (1 Reply)
Discussion started by: harish_s_ampeo
1 Replies
5. Shell Programming and Scripting
Hello guys,
I need your help for a specific sed command that would search for a multi line pattern and if found, would replace it by another multi line pattern.
For instance, here is the input:
<RefNickName>abcd</RefNickName>
<NickName>efgh</NickName>
<Customize>
... (0 Replies)
Discussion started by: xciteddd
0 Replies
6. UNIX for Dummies Questions & Answers
Hi Unix gurus,
I've a dna sequence in a file format known as fasta format (sequence header starts with > and ignored), an example shown below:
>sequence_1
CGTATTCTCCGAATACC
ATACG
>sequence_2
CAGATTTTCAAATACCCCC
In a file like this I want to do the following three search and replace. The... (4 Replies)
Discussion started by: Fahmida
4 Replies
7. Shell Programming and Scripting
Hi,
I have a sample file as shown below, I am looking for sed or any command which prints the complete word only from the input file.
Ex:
$ cat "sample.log"
I am searching for a word which is present in this file
We can do a pattern search using grep but I need to cut only the word which... (1 Reply)
Discussion started by: mohan_kumarcs
1 Replies
8. Shell Programming and Scripting
Hi All
i need to replace the url1 inside <remote> tag in below xml in first instance and in the second instance with url2.
any help appreciated
<locations>
<hudson.scm.SubversionSCM_-ModuleLocation>
<remote>https://svn2015.com/svn/repos/internalshard</remote>
... (4 Replies)
Discussion started by: madankumar.t@hp
4 Replies
9. Shell Programming and Scripting
Hi All,
I'm new to sed.
In following XML file
<interface type='direct'>
<mac address='52:54:00:86:ce:f6'/>
<source dev='eno1' mode='bridge'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
... (8 Replies)
Discussion started by: varunrapelly
8 Replies
LEARN ABOUT DEBIAN
crm_verify
PACEMAKER(8) System Administration Utilities PACEMAKER(8)
NAME
Pacemaker - Part of the Pacemaker cluster resource manager
SYNOPSIS
crm_verify [modifiers] data_source
DESCRIPTION
crm_verify - Check a (complete) confiuration for syntax and common conceptual errors.
Checks the well-formedness of an XML configuration, its conformance to the configured DTD/schema and for the presence of common misconfigu-
rations.
It reports two classes of problems, errors and warnings. Errors must be fixed before the cluster will work properly. However, it is left up
to the administrator to decide if the warnings should also be fixed.
OPTIONS
-?, --help
This text
-$, --version
Version information
-V, --verbose
Increase debug output
Data sources:
-L, --live-check
Check the configuration used by the running cluster
-x, --xml-file=value
Check the configuration in the named file
-X, --xml-text=value
Check the configuration in the supplied string
-p, --xml-pipe
Check the configuration piped in via stdin
Additional Options:
-S, --save-xml=value
Save the verified XML to the named file. Most useful with -L
EXAMPLES
Check the consistency of the configuration in the running cluster:
# crm_verify --live-check
Check the consistency of the configuration in a given file and produce verbose output:
# crm_verify --xml-file file.xml --verbose
AUTHOR
Written by Andrew Beekhof
REPORTING BUGS
Report bugs to pacemaker@oss.clusterlabs.org
Pacemaker 1.1.7 April 2012 PACEMAKER(8)