|
Compare Date And Time
Hi
can somebody send me the code for compare two date and run a shell script. following is the code which i actully want but I am getting errors.
regard
Jamil
. /opt/home/rep/.profile
#!/bin/sh
VALUE=`sqlplus -silent rep/Ndk38f7@dw <<END
set pagesize 0 feedback off verify off heading off echo off
select trunc(max(chg_dt)) from NOT_SCHEDULED_INSTALL;
exit;
END`
VALUE2=`sqlplus -silent rep/Ndk38f7@dw <<END
set pagesize 0 feedback off verify off heading off echo off
select trunc(sysdate) from dual;
exit;
End`
if [[ $VALUE -eq $VALUE2 ]]; then
echo "No rows returned from database"
exit 0
else
echo $VALUE2
echo $VALUE
fi
|