Hi All,
I am comparing two strings inside an if condition if the strings are same then it should go inside the loop else it should execute code given in else part.
But there is a but inside my script
Even if the if condition is true
it is not going inside the loop also it is executing... (4 Replies)
Hi ,
Is there any way i can find a file with specific word inside it.
For example if i want to find a file which has some text written inside it.
How would i form a command to search them? (3 Replies)
I have umpteen number of files containing HTML A tags in the below format
or
I want to find all the lines that contain the word Login=
I used this command
grep "Login=" *
This gave me normal lines as well which contain the word Login= for example, it returned lines which... (2 Replies)
Hi,
In the code included below, the string comparision is not working fine. Please help
while (( find_out >= i ))
do
file=`head -$i f.out|tail -1`
dir=`dirname $file`
cd $dir
Status=""
if ; then
Status=`cvs -Q status... (3 Replies)
The string comparison highlighted below is not working fine. Please help:
while read line
do
# Get File name by deleting everything that preceedes and follows Filename as printed in cvs status' output
f_name=`echo $line | sed -e 's/^File://' -e 's/ *Status:.*//' | awk '{print $NF}'`
... (4 Replies)
hi,
just wanted to make a shortcut of this one
a="a b c"
b=`echo $a | awk '{print $2}'`
echo "the middle is $b"
why can't i do this:
a="a b c"
echo "the middle is ${`echo $a | awk '{print $2}'`}" <- bad substitution :wall:
thanks (6 Replies)
Hi,
I have a very large file that contains a listing of all files on the system. I need to create a listing from that file of all files that start with the following format: s???_*, whereas the '?' represents characters, so the file name begins with an 's' followed by three other characters and... (4 Replies)
I was trying the below statement if
It is working fine if I run it in a test file.
but not working, when I am trying in my actual script.
Error:
: "${FXML_line:1129:1}": bad substitution
Thanks in advance :)
PS: Above if block I have a while loop which is reading a... (4 Replies)
I need to search for string which is formed from the awk input file in a file given as input through -v option. I tried using the while (getline filename) and match(). But this approach is consuming lot of time as the input file has thousands of records. Please suggest any alternative. Thanks! (0 Replies)
Discussion started by: Cool
0 Replies
LEARN ABOUT SUSE
crm_master
CRM_MASTER(8) [FIXME: manual] CRM_MASTER(8)NAME
crm_master - determine which resource instance to promote to master
SYNOPSIS
crm_master [-V|-Q] -D [-l lifetime]
crm_master [-V|-Q] -G [-l lifetime]
crm_master [-V|-Q] -v string [-l string]
DESCRIPTION
crm_master is called from inside the resource agent scripts to determine which resource instance should be promoted to master mode. It
should never be used from the command line and is just a helper utility for the resource agents. RAs use crm_master to promote a particular
instance to master mode or to remove this preference from it. By assigning a lifetime, determine whether this setting should survive a
reboot of the node (set lifetime to forever) or whether it should not survive a reboot (set lifetime to reboot).
A resource agent needs to determine on which resource crm_master should operate. These queries must be handled inside the resource agent
script. The actual calls of crm_master follow a syntax similar to those of the crm_attribute command.
OPTIONS --help, -?
Print a help message.
--verbose, -V
Turn on debug information.
Note
Increase the level of verbosity by providing additional instances.
--quiet, -Q
When doing an attribute query using -G, print just the value to stdout. Use this option with -G.
--get-value, -G
Retrieve rather than set the preference to be promoted.
--delete-attr, -D
Delete rather than set the attribute.
--attr-value string, -v string
Value to set. This is ignored when used with -G.
--lifetime string, -l string
Specify how long the preference lasts. Possible values are reboot or forever.
ENVIRONMENT VARIABLES
OCF_RESOURCE_INSTANCE--the name of the resource instance
FILES
/var/lib/heartbeat/crm/cib.xml--the CIB (minus status section) on disk.
SEE ALSO
???, ???
AUTHOR
crm_master was written by Andrew Beekhof.
[FIXME: source] 07/05/2010 CRM_MASTER(8)