Sponsored Content
Top Forums Shell Programming and Scripting Need to pass Oracle SQL output to Linux and back... Help! Post 302922674 by Corona688 on Monday 27th of October 2014 03:21:59 PM
Old 10-27-2014
Code:
while read -r U
do
        ldapsearch -h $OIDHOST -p $OIDPORT  -w $OIDPWD "(sn=$U)" orclguid sn
done < ldap.txt | while IFS="=" read NAME VAL
do
cn=doe\, john  
orclguid=B2E3F3CADE9EF026E0430AFE192AF026 
sn=jdoe
        if [ -z "$NAME" ]
        then
                printf "%s\t%s\n" "${sn}" "${orclguid}"
                cn=""
                orclguid=""
                sn=""
        else
                read $NAME <<EOF
$VAL
EOF

        fi
done > flatfile

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to pass a oracle variable back to the shell script

Hi, I am calling an oracle function that returns a number (either 0 or 2), how do I pass that pass to the wrapping shell script as I would like to do other things based on the value returned by the oracle function. Your help will be appreciated. -------------------------- sqlplus / <<... (3 Replies)
Discussion started by: Jtrinh
3 Replies

2. UNIX for Dummies Questions & Answers

how to pass values from oracle sql plus to unix shell script

how to pass values from oracle sql plus to unix shell script (2 Replies)
Discussion started by: trichyselva
2 Replies

3. Filesystems, Disks and Memory

in Oracle Enterprise Linux not able to redirect pvscan output

hi, In Oracle Enterprise Linux I'm not able to redirect output of commands pvscan and vgscan into a file. File is coming blank Please suggest something Thanx. (1 Reply)
Discussion started by: discover
1 Replies

4. Linux

In Oracle Enterprise Linux, not able redirect pvscan output

Hi, I'm not able to redirect output of ovscan and vgscan commands to a file in Oracle Enterprise Linux. Please suggest something. Thanks Mayank (1 Reply)
Discussion started by: discover
1 Replies

5. Shell Programming and Scripting

How to Pass the Output Values from the PL/SQL Procedure to Shell Script?

hi, Could anyone tell me how to pass the output values of the PL/SQL procedure to Shell script and how to store that values in a shell script variable... Thanks in advance... (5 Replies)
Discussion started by: funonnet
5 Replies

6. UNIX for Dummies Questions & Answers

Pass value back to unix variable

i had this unix korn shell code that connects to oracle database and execute the oracle procedure. i need to add a variable that indicates the oracle procedure failed. basically the variable is to check if the oracle procedure failed it will assign 1 and when the variable is equal to 1 it will not... (4 Replies)
Discussion started by: wtolentino
4 Replies

7. Shell Programming and Scripting

Pass perl array to SQL oracle

Hello, Could someone please suggest if there is a way to pass an perl array(pass @v_array) to SQL as in below eg : #!/usr/bin/perl @v_array = (1,2,4,5,6,8); $db_userid = 'ni71/ni711'; $bufTPO = qx{ sqlplus -s << EOF $db_userid set verify off set feedback off set... (1 Reply)
Discussion started by: arunshankar.c
1 Replies

8. UNIX for Dummies Questions & Answers

Removing unnecessary eol ($) character from Oracle sql query output

Hi All, I am fetching oracle query result in shell variable. As columns numbers are more the output wraps in unix terminal .i.e one complete record in db gets store in multiple lines. with each line ends with $ character. I want to remove these unnecessary $ character but to keep required $... (8 Replies)
Discussion started by: Harshal22
8 Replies

9. Programming

pass value from Oracle sql to Korn shell

Hi All , I am trying to pass a value from sqlplus to korn shell . There is a table tab1 in Oracle that has a column userdate. I need to pass the userdate to the korn shell . This is what I am doing . VALUE=`sqlplus -silent username/password << END set pagesize 0 feedback off verify off... (14 Replies)
Discussion started by: megha2525
14 Replies

10. Shell Programming and Scripting

How to pass Oracle sql script as argument to UNIX shell script?

Hi all, $ echo $SHELL /bin/bash Requirement - How to pass oracle sql script as argument to unix shell script? $ ./output.sh users.sql Below are the shell scripts and the oracle sql file in the same folder. Shell Script $ cat output.sh #!/bin/bash .... (7 Replies)
Discussion started by: a1_win
7 Replies
OCF_HEARTBEAT_SLAPD(7)						OCF resource agents					    OCF_HEARTBEAT_SLAPD(7)

NAME
ocf_heartbeat_slapd - Manages a Stand-alone LDAP Daemon (slapd) instance SYNOPSIS
slapd [start | stop | monitor | meta-data | validate-all] DESCRIPTION
Resource script for Stand-alone LDAP Daemon (slapd). It manages a slapd instance as an OCF resource. SUPPORTED PARAMETERS
slapd Full path to the slapd binary. For example, "/usr/sbin/slapd". (optional, string, default "/usr/sbin/slapd") ldapsearch Full path to the ldapsearch binary. For example, "/usr/bin/ldapsearch". (optional, string, default "ldapsearch") config Full path to a slapd configuration directory or a slapd configuration file. For example, "/etc/ldap/slapd.d" or "/etc/ldap/slapd.conf". (unique, optional, string, no default) pidfile File to read the PID from; read from olcPidFile/pidfile in config if not set. (optional, string, no default) user User name or id slapd will run with. The group id is also changed to this user's gid, unless the group parameter is used to override. (optional, string, no default) group Group name or id slapd will run with. (optional, string, no default) services LDAP (and other scheme) URLs slapd will serve. For example, "ldap://127.0.0.1:389 ldaps:/// ldapi:///" (unique, optional, string, default "ldap:///") watch_suffix Suffix (database backend) that will be monitored for availability. Multiple suffixes can be specified by providing a space seperated list. By providing one or more suffixes here, the ignore_suffix parameter is discarded. All suffixes will be monitored if left blank. (optional, string, no default) ignore_suffix Suffix (database backend) that will not be monitored for availability. Multiple suffixes can be specified by providing a space seperated list. No suffix will be excluded if left blank. (optional, string, no default) bind_dn Distinguished Name used to bind to the LDAP directory for testing. Leave blank to bind to the LDAP directory anonymously. (optional, string, no default) password Password used to bind to the LDAP directory for testing. (optional, string, no default) parameters slapd may be called with additional parameters. Specify any of them here. (optional, string, no default) stop_escalate Number of seconds to wait for shutdown (using SIGTERM) before resorting to SIGKILL (optional, integer, default 15) SUPPORTED ACTIONS
This resource agent supports the following actions (operations): start Starts the resource. Suggested minimum timeout: 20s. stop Stops the resource. Suggested minimum timeout: 20s. monitor Performs a detailed status check. Suggested minimum timeout: 20s. Suggested interval: 60s. validate-all Performs a validation of the resource configuration. Suggested minimum timeout: 20s. meta-data Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s. EXAMPLE
The following is an example configuration for a slapd resource using the crm(8) shell: primitive p_slapd ocf:heartbeat:slapd op monitor depth="0" timeout="20s" interval="60s" SEE ALSO
http://www.linux-ha.org/wiki/slapd_(resource_agent) AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors) resource-agents UNKNOWN 06/09/2014 OCF_HEARTBEAT_SLAPD(7)
All times are GMT -4. The time now is 10:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy