I have a file having multiple lines in the following order
Name=abc Date=12/10/2013 Name=xyz Date=11/01/2014 Name=pqr Date=06/30/2014 Name=klm Date=07/08/2014 And so on. Date format is mm/dd/yyyy.
I want to write a shell script, which will traverse each line and it should return me the line, whose Date is about to come in next 1 week. Like here, if I run the script today, it must return me
Name=pqr Date=06/30/2014 How to achieve that ?
datecommand you can output a time using relative offsets likedate --date="+1 week".