I need to get a section of a file based on 2 params. I want the part of the file between param 1 & 2. I have tried a bunch of ways and just can't seem to get it right. Can someone please help me out.....its much appreciated. Here is what I have found that looks like what I want....but doesn't... (12 Replies)
hello all,
I have a file like this:
section 1
blah1
blah2
section 2
blah1
blah2
section 3
blah1
blah2
and I want to use sed to duplicate section 2, like this:
section 1
blah1
blah2
section 2
blah1
blah2
section 2
blah1 (2 Replies)
I have a script that produces an output containing '/.ssh'.
I am trying to find a way of parsing only this data from a single line, without removing any other special characters contained within the output as a result of the parse.
Any help would be appreciated (6 Replies)
I'm currently trying to write a ksh or csh script that would change the name of a file found in directories and attach to the name an incrementing three digit number.
I know how to write a script that will go:
000, 001, 002, 003, etc
The twist is I need more increments then allowed by a 3... (11 Replies)
I have a list of Servers in no particular order as follows:
virtualMachines="IIBSBS IIBVICDMS01 IIBVICMA01"And I am generating some output from a pre-existing script that gives me the following (this is a sample output selection).
9/17/2010 8:00:05 PM: Normal backup using VDRBACKUPS... (2 Replies)
I'd like to remove (do a pattern or precise replacement - this I can handle in SED using Regex )
---AFTER THE 1ST Occurrence ( i.e. on the 2nd occurrence - from the 2nd to fourth occurance ) of a specific string : type 1
-- After the 1st occurrence of 1 string1 till the 1st occurrence of... (4 Replies)
Hello
I've got a string of text with a number in pence, e.g. 0.52p, I need to remove the 'p' so that it just reads 0.52 without of course removing all the other 'p' characters.
Many thanks (1 Reply)
Hello,
I'm trying to remove an arbitrary number of semicolons at the end of each line in the input file.
Input:
44;I;1000031;;;B;0137;0;;01.02.2008;03.02.2009;;;;;;;;;;;;;0028-101746;;;
45;I;1000031;;;B;0137;0;;01.02.2008;03.02.2009;;;;;;;;;;;;;0028-101746;;;;;
... (6 Replies)
Hello.
I am trying to modify a config file which is in windows *.ini type file.
I have found a piece of code here :linux - Edit file in unix using SED - Stack Overflow
As I can't make it doing the job , I am trying to find a solution step by step.
here a modified sample file : my_sample.ini... (1 Reply)
Hi, I have following data in a file. Not all but most of the lines start with letter 'T' has 8 SPACES from column 121 to 128 and I want to replace that portion with some dummy value. Is it possible through sed?
Input File:-
T1111111111111A 20140310000000005076358416369283 AAAAA ... (6 Replies)
Discussion started by: jnrohit2k
6 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)