|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
Grep help
I want to grep a range of times from a file.
File looks like this: Jun 1 8:50:18 Jun 1 8:53:22 Jun 1 8:59:43 Jun 1 9:34:23 Jun 1 10:02:00 Jun 1 11:02:00 Jun 1 11:03:00 Jun 1 12:02:00 Jun 1 23:55:59 I want to grep for "Jun 1" but I want times 8-11. I know its easy, but Im new! ![]() |
| Sponsored Links | ||
|
|
|
|||
|
Actually Code:
egrep 'Jun 1 ([89]|1[01])' file ... if you want everything between those times. (Maybe leave out the 11 if you only want through 10:59.) |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Grep | Aejaz | UNIX for Advanced & Expert Users | 3 | 04-30-2008 08:10 AM |
| help on grep | prvnrk | Shell Programming and Scripting | 5 | 01-08-2008 05:47 AM |
| grep | dineshr85 | Shell Programming and Scripting | 1 | 10-10-2007 05:52 AM |
| how to exclude the GREP command from GREP | yamsin789 | UNIX for Advanced & Expert Users | 2 | 10-05-2007 03:59 AM |
| Make grep -c display like grep -n? | Jerrad | Shell Programming and Scripting | 2 | 08-25-2006 01:20 AM |