The UNIX and Linux Forums  

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


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to calculate busy hour shary Shell Programming and Scripting 14 01-29-2008 02:04 AM
AIX 5.3 12 Hour System Clock RTwitchell AIX 2 04-10-2007 01:02 PM
an hour less in 24 hour system bobo UNIX for Dummies Questions & Answers 3 10-23-2006 08:55 AM
1 Hour less bobo UNIX for Dummies Questions & Answers 6 05-16-2006 09:07 AM
record wc -l over 24 hour period csaunders Shell Programming and Scripting 5 12-09-2005 10:49 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-30-2008
ali560045's Avatar
Registered User
 

Join Date: Oct 2007
Posts: 170
help in hour grep

i have this script that checks for yesterday date and also specific hour in that

-----------------------------------------------------------------


TZ=`date +%Z`+24 ;a=`date +%Y-%m-%d %k`
cd logs
count=0
for i in DBMaint.log
do

cat $i | grep $a >> file12.txt
done
----------------------------------------------------------------

here k=hour which i want to set it to 22.how to do that.

actually i want to grep yesterday date and in that 22nd hour ,so how to specify that in below command


TZ=`date +%Z`+24 ;a=`date +%Y-%m-%d %k`
------------------------------------------------------------
how to set the desired value in above command for hour

Last edited by ali560045; 01-30-2008 at 11:59 PM.
Reply With Quote
Google UNIX.COM
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:52 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0