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 -->
  #7 (permalink)  
Old 01-31-2008
ali560045's Avatar
ali560045 ali560045 is offline
Registered User
 

Join Date: Oct 2007
Posts: 299
thanks buddy. really didnt meant to offend you. i mso sorry if i hurt u, here is the sample

2008-01-30 15:06:29,985
2008-01-30 19:06:29,985
2008-01-30 20:06:29,985
2008-01-30 21:06:29,987
2008-01-30 21:06:29,988
2008-01-30 22:06:30,037
2008-01-30 22:06:30,050
2008-01-30 22:06:30,052
2008-01-30 22:06:30,053
2008-01-30 22:06:30,054
2008-01-30 22:06:30,056
2008-01-30 23:06:30,056
2008-01-30 23:56:30,066

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


here i want to grep 22nd hour of yesterday date.......but in my script i m grepping all hour. so i thought that there may be a way in which i can assingn value to the hour in date format

i can use this way also

cat $i | grep "$a" | grep "22:" >> /ednadtu3/u01/pipe/naveed/file12.txt

but thats not the way i want it .........it is not flexible
Reply With Quote