07-16-2008
How to build a string in shell script
Hi all,
I had a typical problem.
I am using a parameter
PK="PK1 PK2 PK3"
i need to build the string
a.PK1=b.PK1 and a.PK2=b.PK2 and a.PK3=b.PK3
Please help
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
All,
I want to develope a script.
can you please give me solution to this script?
Several Processes Reporting Status back to a Master
Write two programs that communicate using message queues. One program (the
master) will receive messages periodically sent by multiple copies of the... (5 Replies)
Discussion started by: vishalpatel03
5 Replies
2. Shell Programming and Scripting
Iam trying to compare the string in if else... but some how its not working
following is the code
On executing the above one its giving a error message ': bad number'
in the above parameter l & k are numbers and dbfiles and patchefiles are array
If i do echo ift working fine
... (2 Replies)
Discussion started by: kiranlalka
2 Replies
3. Shell Programming and Scripting
#! /bin/csh
set delimiter = |
foreach i (*)
set str_deli="$i$delimiter"
question: how to retain the value of str_deli so i can build a pipe delimited string?
end (1 Reply)
Discussion started by: jdsignature88
1 Replies
4. Shell Programming and Scripting
Have to read one file say sourcefile containing several words and having another folder containing several files.
Now read the first word of Sourcefile & search it into the folder consisting sevral files, and create another file with result. We hhave to pick the filename of the file in which... (3 Replies)
Discussion started by: mukesh.baranwal
3 Replies
5. Shell Programming and Scripting
HI,
I have a string "NZ-deploy-mode-1.15-Linux.x86_64.rpm"
I want to get the string before -1 ie "NZ-deploy-mode"
Input is "NZ-deploy-mode-1.15-Linux.x86_64.rpm"
expected output is "NZ-deploy-mode"
How can I do that in shell script?
Thanks in advance. (6 Replies)
Discussion started by: Ananthdoss
6 Replies
6. Shell Programming and Scripting
hi
in a script i hate string definitions like
str="***********************************"
who can help to build a 50 character long string of asterisks more elegantly?
any hint is welcome
thanks and regards
lazy (18 Replies)
Discussion started by: lazybaer
18 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I am trying to to compare a string variable with a string literal inside a loop but keep getting the
./testifstructure.sh: line 6:
#!/bin/sh
BOOK_LIST="BOOK1 BOOK2"
for BOOK in ${BOOK_LIST}
do
if
then echo '1'
else
echo '2'
fi
done
Please use next... (1 Reply)
Discussion started by: daveu7
1 Replies
8. Shell Programming and Scripting
I have to get the last value from a string, below is the example string
String -> Here is the test string 12233
O/P -> 12233
String -> Hello world 500
O/P -> 500
String -> 300
O/P -> 300
Please help (2 Replies)
Discussion started by: vel4ever
2 Replies
9. Shell Programming and Scripting
Hi all,
I'm trying at the moment to write a shell script to build a directory tree and create files within the built directories. I've scoured through sites and text books and I just can't figure out how to go about it.
I would assume that I need to use loops of some sort, but I can't seem... (8 Replies)
Discussion started by: Libertad
8 Replies
10. Shell Programming and Scripting
Hi
I have a build.xml file and I can run it on Windows via cmd. Now I want to write a script to invoke the same. Is there a way to do this? (1 Reply)
Discussion started by: ankur328
1 Replies
LEARN ABOUT DEBIAN
ocf_heartbeat_ids
OCF_HEARTBEAT_IDS(7) OCF resource agents OCF_HEARTBEAT_IDS(7)
NAME
ocf_heartbeat_ids - Manages an Informix Dynamic Server (IDS) instance
SYNOPSIS
ids [start | stop | status | monitor | meta-data | validate-all]
DESCRIPTION
OCF resource agent to manage an IBM Informix Dynamic Server (IDS) instance as an High-Availability resource.
SUPPORTED PARAMETERS
informixdir
The value the environment variable INFORMIXDIR has after a typical installation of IDS. Or in other words: the path (without trailing
'/') where IDS was installed to. If this parameter is unspecified the script will try to get the value from the shell environment.
(optional, string, no default)
informixserver
The value the environment variable INFORMIXSERVER has after a typical installation of IDS. Or in other words: the name of the IDS
server instance to manage. If this parameter is unspecified the script will try to get the value from the shell environment.
(optional, string, no default)
onconfig
The value the environment variable ONCONFIG has after a typical installation of IDS. Or in other words: the name of the configuration
file for the IDS instance specified in INFORMIXSERVER. The specified configuration file will be searched at '/etc/'. If this parameter
is unspecified the script will try to get the value from the shell environment. (optional, string, no default)
dbname
This parameter defines which database to use in order to monitor the IDS instance. If this parameter is unspecified the script will use
the 'sysmaster' database as a default. (optional, string, default sysmaster)
sqltestquery
SQL test query to run on the database specified by the parameter 'dbname' in order to monitor the IDS instance and determine if it's
functional or not. If this parameter is unspecified the script will use 'SELECT COUNT(*) FROM systables;' as a default. (optional,
string, default SELECT COUNT(*) FROM systables;)
SUPPORTED ACTIONS
This resource agent supports the following actions (operations):
start
Starts the resource. Suggested minimum timeout: 120.
stop
Stops the resource. Suggested minimum timeout: 120.
status
Performs a status check. Suggested minimum timeout: 60.
monitor
Performs a detailed status check. Suggested minimum timeout: 30. Suggested interval: 10.
validate-all
Performs a validation of the resource configuration. Suggested minimum timeout: 5.
meta-data
Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5.
methods
Suggested minimum timeout: 5.
usage
Suggested minimum timeout: 5.
EXAMPLE
The following is an example configuration for a ids resource using the crm(8) shell:
primitive p_ids ocf:heartbeat:ids
op monitor depth="0" timeout="30" interval="10"
SEE ALSO
http://www.linux-ha.org/wiki/ids_(resource_agent)
AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors)
resource-agents UNKNOWN 03/09/2014 OCF_HEARTBEAT_IDS(7)