Re: [Nolug] bash problem

From: Brad Bendily <bendily_at_gmail.com>
Date: Fri, 26 Jul 2013 11:00:03 -0500
Message-ID: <CACpJzDScFtxH-Gx3oroc-2oMKQR-W9W0orpoibQWDCWeFBOptQ@mail.gmail.com>

>From your code, you left out an C in account.
"where username = $TARGET_ACOUNT"

On Fri, Jul 26, 2013 at 10:51 AM, Diann Smith <diann170@gmail.com> 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
>

-- 
Have Mercy & Say Yeah
___________________
Nolug mailing list
nolug@nolug.org
Received on 07/26/13

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