Директории, соответственно, надо поправить в экспорте и cd
Цитата: #!/bin/bash
cd /home/oraclebi
export ORACLE_HOME=/home/oraclebi/for_data_guard/10.2.0.4_client;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib;
export PATH=$PATH:$ORACLE_HOME/bin;
MONIK=`$ORACLE_HOME/bin/sqlplus -S "sys/qqq@base as sysdba"<<EOF
SET LINESIZE 1200
SET PAGESIZE 0
SET FEEDBACK OFF
SET ECHO OFF
SET VERIFY OFF
SET PAUSE OFF
SET TRIMSPOOL OFF
select trunc(sum(bytes)/1024/1024/1024) from dba_segments where TABLESPACE_NAME!='UNDO';
exit;
EOF`
if [ -f worksize ]
then
MONIX=`cat worksize`;
else
MONIX="0";
fi;
if [ ! $MONIK -eq $MONIX ]
then
echo `date`" -- $MONIK Gb";
echo `date`" -- $MONIK Gb">>size_log.log;
echo $MONIK >worksize ;
fi;
exit;