Hi Alan
Try this
alias dbsize="echo "`expr \`(ls -l /ora/data/da001/${ORACLE_SID}* | awk
'{print $5," + "}'; echo 0)`""
Example:
m1:TWSM:/ora/admin/maint> alias dbsize="echo "`expr \`(ls -l
/ora/data/da001/${ORACLE_SID}* | awk '{print $5," + "}'; echo 0)`""
m1:TWSM:/ora/admin/maint> dbsize
497520640
m1:TWSM:/ora/admin/maint>
With regards
Alex Afanassiev
Oracle DBA, TOC OPS/Internet.Operations
Tel: (03) 8 661 20 61
Fax: (03) 9 650 36 74
> -----Original Message-----
> From: Martin, Alan [SMTP:Alan.Martin_at_GMACInsurance.com]
> Sent: Thursday, July 13, 2000 7:57 AM
> To: Multiple recipients of list ORACLE-L
> Subject: UNIX alias question
>
> What is the proper syntax to make an alias out of:
>
> expr `(ls -l /ora/data/da001/${ORACLE_SID}* | awk '{print $5," + "}'; echo
> 0)`
>
> I tried several ways including:
>
> alias dbsize=\'expr `(ls -l /vol*/oradata/${ORACLE_SID}/* | awk \'{print
> $5," + "}\'; echo 0)`'
> ksh: 0403-057 Syntax error: `)' is not expected.
>
> I've been staring at this too long...
>
> TIA,
> Alan Martin
> Database Administrator
> GMAC Insurance Personal Lines
> Winston-Salem, NC
> Alan.Martin_at_GMACInsurance.com
>
>
>
> --
> Author: Martin, Alan
> INET: Alan.Martin_at_GMACInsurance.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Thu Jul 13 2000 - 00:10:29 CDT