Computing.Net > Forums > Unix > Concate contents with checks

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Concate contents with checks

Reply to Message Icon

Name: dongcute
Date: December 13, 2007 at 19:03:31 Pacific
OS: Window XP
CPU/Ram: 1.7
Product: nc4400
Comment:

Hi all,

Is there a way (in bash) for which I can check the date range of two files and check that if it fall within my desire date range, it will concatenate the two file contents (those that fulfill my desire date range). The end result will be a new file and thereby leaving the original files alone.

Example:
File 1 name: August2007
It contents:
[01th August 2007 10:03:24] Login failure error code 1
[15th August 2007 10:04:31] Login failure error code 2
[17th August 2007 10:07:31] Login failure error code 1

File 2 name: Sepember2007
It contents:
[01th September 2007 11:03:24] Login failure error code 3
[02th September 2007 11:04:31] Login failure error code 1
[15th September 2007 12:07:31] Login failure error code 4
[16th September 2007 11:07:31] Login failure error code 1

My desire output file: Aug16toSept15
It contents:
[17th August 2007 10:07:31] Login failure error code 1
[01th September 2007 11:03:24] Login failure error code 3
[02th September 2007 11:04:31] Login failure error code 1
[15th September 2007 12:07:31] Login failure error code 4



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Concate contents with checks

Help with checking scripts www.computing.net/answers/unix/help-with-checking-scripts/4988.html

UNIX , check dir on other hosts www.computing.net/answers/unix/unix-check-dir-on-other-hosts/5156.html

how to validate a file content? www.computing.net/answers/unix/how-to-validate-a-file-content/5567.html