I am not sure how to approach this find/replace using a shell script. Any help or guidance appreciated.
I want to find this:
<objects/>
<thumb>thumb_0001.jpg</thumb>
<preview>preview_0001.jpg</preview>
And replace with something like this:
<objects>... (1 Reply)
Hi All,
I want to change the name as SEQ_13
ie., <Property Name="Name">SEQ_13</Property>
when the Stage Type is PxSequentialFile
ie., <Property Name="StageType">PxSequentialFile</Property> :wall:
Input.XML
<Main>
<Record Identifier="V0S13" Type="CustomStage" Readonly="0">... (3 Replies)
Dear All,
I do not have any knowledge of scripting. I want to replace specific lines of a text file with a specific text. Like I have one file which is "original file" and one file "changes file" which has list of lines which I want to replace in original file with a specific string. I want the... (5 Replies)
Hello,
I have an xml file whose contacts are like below:
<Node>Apple
<B>Value1</B>
<B>Value2</B>
<B>Value3</B>
</Node>
<Node>Mango
<B>Value1</B>
<B>Value2</B>
<B>Value3</B>
</Node>
<Node>Apple
<B>Value1</B>
<B>Value2</B>
<B>Value3</B>
</Node>
<Node>Bannana (3 Replies)
I have two files
a.txt
b.txt
I want to find a line in a.txt and replace by another line from b.txt
a.txt
asfsdfsfsfdfsf
asfwererfgdgf
wrerwetretfdg
b.txt
werdfgdfgf
werergfdgd
sfdfgfgfgfgg
i want to replace the 1st line of a.txt by 1st line of b.txt
i want out put as (5 Replies)
Please help me, wasted hrs:wall:, to find this soulution:-
I need a command that will work on file (xml) and replace multiple occurrence (more than 2 times)
Examples
1. '==='
2. '===='
3. '======='
should be replaced by just '=='
Note :- single character should be replaced. (=... (13 Replies)
Hi All,
My XML file looks like below:
<logEvent xsi:type="logservice:LogEvent" timestamp="1394713811052" severity="3" messageCode="TM_6228" message="Writing session output to log file ." user="" stacktrace="" service="" serviceType="IS" clientNode="dev" pid="712" threadName="DIRECTOR"... (3 Replies)
Dear all,
I want to find all the "," in my text file and then replace the commas to a tab. I found a script online but I don't know how to modify the script for my case. Any one can help? Thank you.
@echo off &setlocal
set "search=%1"
set "replace=%2"
set "textfile=Input.txt"
set... (2 Replies)
Hello Team,
I have 2 files.one contains english text and another contains Japanese. so i have to read english text and replace the text with Japanesh text in third file.
Basically, I need a help to write japanese language in text/xml file.I heard wstring does this.Not sure how do i write... (2 Replies)
Discussion started by: SA_Palani
2 Replies
LEARN ABOUT DEBIAN
cibadmin
PACEMAKER(8) System Administration Utilities PACEMAKER(8)NAME
Pacemaker - Part of the Pacemaker cluster resource manager
SYNOPSIS
cibadmin command [options] [data]
DESCRIPTION
cibadmin - Provides direct access to the cluster configuration.
Allows the configuration, or sections of it, to be queried, modified, replaced and deleted.
Where necessary, XML data will be obtained using the -X, -x, or -p options
OPTIONS
-?, --help
This text
-$, --version
Version information
-V, --verbose
Increase debug output
Commands:
-u, --upgrade
Upgrade the configuration to the latest syntax
-Q, --query
Query the contents of the CIB
-E, --erase
Erase the contents of the whole CIB
-B, --bump
Increase the CIB's epoch value by 1
-C, --create
Create an object in the CIB. Will fail if the object already exists.
-M, --modify
Find the object somewhere in the CIB's XML tree and update it. Fails if the object does not exist unless -c is specified
-P, --patch
Supply an update in the form of an xml diff (See also: crm_diff)
-R, --replace
Recursivly replace an object in the CIB
-D, --delete
Delete the first object matching the supplied criteria, Eg. <op id="rsc1_op1" name="monitor"/>
The tagname and all attributes must match in order for the element to be deleted
-d, --delete-all
When used with --xpath, remove all matching objects in the configuration instead of just the first one
-5, --md5-sum
Calculate the on-disk CIB digest
-6, --md5-sum-versioned
Calculate an on-the-wire versioned CIB digest
-S, --sync
(Advanced) Force a refresh of the CIB to all nodes
-a, --empty
Output an empty CIB
Additional options:
-f, --force
-t, --timeout=value
Time (in seconds) to wait before declaring the operation failed
-s, --sync-call
Wait for call to complete before returning
-l, --local
Command takes effect locally. Should only be used for queries
-c, --allow-create
(Advanced) Allow the target of a -M operation to be created if they do not exist
-n, --no-children
(Advanced) When querying an object, do not return include its children in the result
Data:
-X, --xml-text=value
Retrieve XML from the supplied string
-x, --xml-file=value
Retrieve XML from the named file
-p, --xml-pipe
Retrieve XML from stdin
-A, --xpath=value
A valid XPath to use instead of -o
-o, --scope=value
Limit the scope of the operation to a specific section of the CIB. Valid values are: nodes, resources, constraints, crm_config,
rsc_defaults, op_defaults, status
-N, --node=value
(Advanced) Send command to the specified host
EXAMPLES
Query the configuration from the local node:
# cibadmin --query --local
Query the just the cluster options configuration:
# cibadmin --query --scope crm_config
Query all 'target-role' settings:
# cibadmin --query --xpath "//nvpair[@name='target-role']"
Remove all 'is-managed' settings:
# cibadmin --delete-all --xpath "//nvpair[@name='is-managed']"
Remove the resource named 'old':
# cibadmin --delete --xml-text '<primitive id="old"/>'
Remove all resources from the configuration:
# cibadmin --replace --scope resources --xml-text '<resources/>'
Replace the complete configuration with the contents of $HOME/pacemaker.xml:
# cibadmin --replace --xml-file $HOME/pacemaker.xml
Replace the constraints section of the configuration with the contents of $HOME/constraints.xml:
# cibadmin --replace --scope constraints --xml-file $HOME/constraints.xml
Increase the configuration version to prevent old configurations from being loaded accidentally:
# cibadmin --modify --xml-text '<cib admin_epoch="admin_epoch++"/>'
Edit the configuration with your favorite $EDITOR:
# cibadmin --query > $HOME/local.xml
# $EDITOR $HOME/local.xml
# cibadmin --replace --xml-file $HOME/local.xml
SEE ALSO:
CRM shell, crm(8), crm_shadow(8)AUTHOR
Written by Andrew Beekhof
REPORTING BUGS
Report bugs to pacemaker@oss.clusterlabs.org
Pacemaker 1.1.7 April 2012 PACEMAKER(8)