The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 01-31-2008
ali560045's Avatar
ali560045 ali560045 is offline
Registered User
 

Join Date: Oct 2007
Posts: 299
little help in command

this is my script:


TZ=`date +%Z`+24 ;a=`date +%Y-%m-%d`

cd /ednadtu3/u01/pipe/logs
for i in DBMaint.log
do

cat $i | grep $a >> /ednadtu3/u01/pipe/naveed/file12.txt
done
-------------------------------------------------------------------------------------

here i want to grep the 22nd hour of yesterday date, so that my script will grep only 22nd hour of yesterday date .but this script gives me all the hour of yesterday date

Last edited by ali560045; 01-31-2008 at 03:24 AM..
Reply With Quote
Remove advertisements
!!
Forum Sponsor