Greetings,
I have a set of files in a directory with their epoch date/time.
I want to know what is the best way to get all the files under the same day for example:
file1_1344261690 = 6 Aug 2012 15:1:30
file2_1344264601 = 6 Aug 2012 15:50:1
file3_1344318351 = 7 Aug 2012 6:45:51
file4_1344321755 = 7 Aug 2012 7:42:35
I want to gather all files with the same date and put the contents of the files into file large file for example:
file_6aug.txt would contain the contents of file1_1344261690 & file2_1344264601
file_7aug.txt would contain the contents of file3_1344318351 & file4_1344321755
What is the best way to get this done?
Cheers,
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.