Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Need to get out of 2 variables in scripts Post 303037122 by balajesuri on Wednesday 24th of July 2019 08:16:21 AM
Old 07-24-2019
I think your set -x gives pretty clear idea that "srvctl config database...." is not having any output. So $STANDBY_CONF is empty.
May be you want to check by running this command directly on command line and see why it's not showing any output.
This User Gave Thanks to balajesuri For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

executing variables in ksh scripts?

In a ksh script on an AIX box running a jillion oracle database processes, I'm setting a variable to one of two possible arguments, depending on cmd line arguments. FINDIT="ps -ef | grep oracle | grep DBexport | grep rshrc" -or- FINDIT="ps -ef | grep oracle | grep prod | grep runback" I... (3 Replies)
Discussion started by: zedmelon
3 Replies

2. UNIX for Dummies Questions & Answers

Variables in scripts

Just a quick question. If I have a script that calls another script while running, is it possible for the second script to reference a variable in the first script and if so, how. Is it scriptname.sh:$VARIABLE for a global variable and can you do scriptname.sh:function $VARIABLE or am I off my... (1 Reply)
Discussion started by: kirkm76
1 Replies

3. Shell Programming and Scripting

How to access variables across scripts

Hi All, I have declared a variable in script1 and assign a value for it. In script2 i'll call script1 and then I want the value of variables set in script1. I have tried with export, but in vain. How can I achive this? Below is the two scripts. --script1 #!/usr/bin/ksh echo $1... (1 Reply)
Discussion started by: javaDev
1 Replies

4. UNIX for Dummies Questions & Answers

Passing variables between scripts...

Hey all, I'm wondering how you pass variable's that are defined in one script to another script that's been called by that first script..... Best regards, Jaz (1 Reply)
Discussion started by: Jazmania
1 Replies

5. Shell Programming and Scripting

Passing variables between scripts

Hi all. I need to pass a value from a script that runs in a sub-shell, back into the calling shell like below (or into script 2 directly): outer_script export param=value1 script1 $param (in script1: export param=value2) script2 $param ($param is now value1, not value2... (4 Replies)
Discussion started by: bbergstrom74
4 Replies

6. Shell Programming and Scripting

Scope of variables between scripts

Friends, I am using ksh under SunoS. This is what I have In file1.sh NOW=$(date +"%b-%d-%y") LOGFILE="./log-$NOW.log" I will be using this file through file1.sh as log file. I have another script file2.sh which is being called inside my file1.sh. I would like to use the same log... (6 Replies)
Discussion started by: dahlia84
6 Replies

7. UNIX for Advanced & Expert Users

How to make the variables of one script available for the other scripts?

Hello Everyone, I want to know how can we make the variables of one script available for the other script? for example i have three scripts variable_availability.sh,first.sh,second.sh and a file containing variables called common ---------------------------------- cat variable_availability.sh... (2 Replies)
Discussion started by: Kesavan
2 Replies

8. Shell Programming and Scripting

How to declare variables once and reuse them in other scripts?

Hello everyone. I'm trying to create a conf file with variables that my other scripts will use. I have several scripts that use the same variables, and since I don't know how to read them from an external file, i define them in each script (and then if i want to change one's value i need to... (4 Replies)
Discussion started by: moshe88
4 Replies

9. Shell Programming and Scripting

Passing variables between sub-scripts

I have written a program for some data analysis. It is gettin long. I would like to restructure it so that i can have a master file which controls multiple subscripts in order to make it easier to understand. I need to be able to define variables in the master script which are used by all three... (2 Replies)
Discussion started by: carlr
2 Replies

10. Shell Programming and Scripting

How to pass variables between scripts?

Hello, I have two bash scripts like the following: script 1: #!/bin/bash var=WORLD bash path/to/second/script/script2.bash script 2: #!/bin/bash echo "HELLO $var" I expected the output to be "HELLO WORLD" but instead, I get "HELLO". I understand that when I envoke another bash... (2 Replies)
Discussion started by: jl487
2 Replies
SLAPINDEX(8)                                                  System Manager's Manual                                                 SLAPINDEX(8)

NAME
slapindex - Reindex entries in a SLAPD database SYNOPSIS
/usr/sbin/slapindex [-b suffix] [-c] [-d debug-level] [-f slapd.conf] [-F confdir] [-g] [-n dbnum] [-o option[=value]] [-q] [-t] [-v] [attr[...]] DESCRIPTION
Slapindex is used to regenerate slapd(8) indices based upon the current contents of a database. It opens the given database determined by the database number or suffix and updates the indices for all values of all attributes of all entries. If a list of specific attributes is provided on the command line, only the indices for those attributes will be regenerated. Databases configured as subordinate of this one are also re-indexed, unless -g is specified. All files eventually created by slapindex will belong to the identity slapindex is run as, so make sure you either run slapindex with the same identity slapd(8) will be run as (see option -u in slapd(8)), or change file ownership before running slapd(8). OPTIONS
-b suffix Use the specified suffix to determine which database to generate output for. The -b cannot be used in conjunction with the -n option. -c enable continue (ignore errors) mode. -d debug-level enable debugging messages as defined by the specified debug-level; see slapd(8) for details. -f slapd.conf specify an alternative slapd.conf(5) file. -F confdir specify a config directory. If both -f and -F are specified, the config file will be read and converted to config directory format and written to the specified directory. If neither option is specified, an attempt to read the default config directory will be made before trying to use the default config file. If a valid config directory exists then the default config file is ignored. -g disable subordinate gluing. Only the specified database will be processed, and not its glued subordinates (if any). -n dbnum Generate output for the dbnum-th database listed in the configuration file. The config database slapd-config(5), is always the first database, so use -n 0 The -n cannot be used in conjunction with the -b option. -o option[=value] Specify an option with a(n optional) value. Possible generic options/values are: syslog=<subsystems> (see `-s' in slapd(8)) syslog-level=<level> (see `-S' in slapd(8)) syslog-user=<user> (see `-l' in slapd(8)) -q enable quick (fewer integrity checks) mode. Performs no consistency checks when writing the database. Improves indexing time, how- ever the database will most likely be unusable if any errors or interruptions occur. -t enable truncate mode. Truncates (empties) an index database before indexing any entries. May only be used with Quick mode. -v enable verbose mode. LIMITATIONS
Your slapd(8) should not be running (at least, not in read-write mode) when you do this to ensure consistency of the database. slapindex ought to be run as the user specified for slapd(8) to ensure correct database permissions. This command provides ample opportunity for the user to obtain and drink their favorite beverage. EXAMPLES
To reindex your SLAPD database, give the command: /usr/sbin/slapindex To regenerate the index for only a specific attribute, e.g. "uid", give the command: /usr/sbin/slapindex uid SEE ALSO
ldap(3), ldif(5), slapadd(8), ldapadd(1), slapd(8) "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/) ACKNOWLEDGEMENTS
OpenLDAP Software is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. OpenLDAP Software is derived from Uni- versity of Michigan LDAP 3.3 Release. OpenLDAP 2012/04/23 SLAPINDEX(8)
All times are GMT -4. The time now is 01:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy