How can I convert 14/Jul/2015
into 14-08-2015
?
It is saying invalid date format
because of the Jul
element, but if I put 07
then it works fine.
I have tried this:
echo "Please enter the date: "
read X (here X is 14/Jul/2015)
a= date --date=$X '+%d-%b-%y'
echo "$a"