The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 09-28-2006
Jamil Qadir Jamil Qadir is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 13
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