|
greping date in a file
i have a script that checks inside the file and find the start date and end date with time...........
#!/bin/ksh
cd /ednadtu3/u01/pipe/logs
TZ=`date +%Z`+24 ;b=`date +%Y-%m-%d`
echo $b
for i in DBMaint.log
do
echo "Start Time:" >> /ednadtu3/u01/pipe/naveed/Report.txt
cat $i | grep $b | while read LINE1
do
echo $b >> /ednadtu3/u01/pipe/naveed/Report.txt
done
echo "End Time:" >> /ednadtu3/u01/pipe/naveed/Report.txt
cat $i | grep $b | while read LINE2
do
echo $b >> /ednadtu3/u01/pipe/naveed/Report.txt
done
done
------------------------------------------------------------------
this script is returning null result..... i know something is wrong in the logic.
actually i want to cat a file and check the start time of the file and end time of the file........
can anyone help me in that
|