The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Search files between a date range zcanji Shell Programming and Scripting 7 05-27-2009 12:31 PM
Report file extraction based on Date range ganapati Shell Programming and Scripting 2 07-13-2006 11:26 AM
Log File date compare for user defined range mojo24 Shell Programming and Scripting 0 05-05-2006 06:39 AM
cp only files in certain date range ee7klt UNIX for Dummies Questions & Answers 1 06-27-2005 09:35 PM
Need to print file names in a certain date range using ls Shamwari UNIX for Dummies Questions & Answers 2 10-08-2001 07:14 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-29-2007
ambharish ambharish is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 2
Question get Message from file within date range

Hi All,

I am a java devloper putting my hands on shell scripts.

Honestly it sounds coool and interesting

Presently I got stuck with the following requirement.

Get the messages from file. The messages in the file are as follows:

date|message1
date|message2
.
.
.

date is of format: yyyy-MM-dd-hh-mm (for eg 2007-06-29-05-58)

Wht I need is get all the messages with in the range.

I have tried with sed as below:
sed -n "/2007-06-29-05-58/,/2007-06-29-09-25/p" file1.txt

but I wont get all the output required. Is there anything wrg in my approach to retreive messages.

Any help is Greatly Aappreciated !!!
Thanks is Andvance.

Cheers,
Ambha
  #2 (permalink)  
Old 06-29-2007
anbu23 anbu23 is offline Forum Advisor  
Registered User
  
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,398
Check this post
http://www.unix.com/shell-programmin...#post302124211
  #3 (permalink)  
Old 06-29-2007
ambharish ambharish is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 2
Thank you for instant reply.

The link matches my requirement.

Thx once again !
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:42 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0