There are two date format used in shell script:
Format 1. 01-01-2014
Format 2. 2014-01-01
Scenario:
format 1 is a directory, while format 2 is file name.
I am trying to parse format 2 file using shell script, but stuck at one point.
I am managing call to directory having format 1 by defining all values in array, now for each array value I am parsing required file in format 2.
Now to manage array of format 2.
Problem can be solved if , I can do date conversion like in PHP.
$date='01-01-2014'
$filetosearch=date('Y-m-d',strtotime($date))
by doing above two steps I can get two different date format from one I define in array. so such thing happen in shell or not.