Re: [Nolug] bash problem

From: B. Estrade <estrabd_at_gmail.com>
Date: Fri, 26 Jul 2013 13:00:08 -0500
Message-ID: <20130726180008.GA97546@web0.0x743.com>

On Fri, Jul 26, 2013 at 10:51:37AM -0500, Diann Smith wrote:
> I am a newbi and I have a problem trying to run this code. I am trying to
> put a unix variable - (Target_account)
> into a bash/unix scritpt. If anyone could help I would appreciate it.
>
> Thanks
> diann
> #!/bin/bash
>
> TARGET_ACCOUNT=TORY4
> TARGET_DATABASE=testbat
> RS=samp.lst
> . ${MMS_LOCAL}/etc/env_testbat.sh
> echo SID=$ORACLE_SID
> sqlplus / ' as sysdba' <<EOF
>
> SELECT username, expiry_date
> from dba_users
> where username = $TARGET_ACOUNT
> and round (expiry_date - sysdate < 11);
> EOF

1. Is MM_LOCAL defined?

2. What's in $MM_LOCAL/etc/env_testbat.sh ?

3. are you meaning to echo "SID=$ORACLE_SID" or is this supposed to be
an actual assignment?

4. is that forward slash following 'sqlplus' legit?

5. is 'sqlplus' a function or executable, if the former is it defined?
If the latter, is it in $PATH?

Also, you define "RS", but don't use it in that snippet.

Brett

-- 
___________________
Nolug mailing list
nolug@nolug.org
Received on 07/26/13

This archive was generated by hypermail 2.2.0 : 07/26/13 EDT