December 27th, 2011, 08:20 PM
Command to print the dates between a Range
I am new to this Forum & LINUX. I am sure I am probably going to ask one simple 'How to' question on LINUX.
Can you pls help me with a command to print the dates between a date range. If I pass the current date & 20111218, it should print all the dates between these 2 as the output.
I dont want to use a Script to do it, looking for a single command instead.
Appreciate your help in this.
December 29th, 2011, 09:04 AM
I don't know of any single commands that have this feature.
December 30th, 2011, 11:03 AM
Script to Combine the N days files that falls between a Date Range
Thanks Oreo for your reply.
Let me put the requirement clearly.
1) We store the last run date of a process in a file. When the batch run the next time, it should read this file, get the last run date from the file. Using this date, the script should read all the files from the Directory that falls between Current Date & previous run date (the date we got from file) & combine it into one Single file for further processing.
Any help/thoughts on how to accomplish this through Shell Script/multiple commands will be highly appreciated.
Thanks in Advance,
December 30th, 2011, 04:52 PM
Use that date/time to touch (touch -t I think it would be) a dummy file to set it's last modification date/time and use the relevent -newer (I think) option of a find command to list all files modified since that date.
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc