I have a file with date and time on a couple thousand lines.
I need to convert:
2019/08/02-01:23:50+0000
To:
02/Aug/2019-01:23:50 +0000
I so far have
th=`grep -o '\[.*\]' test.txt | sed 's/\"//g' | head -1
echo $th | date -d +'%Y/%b/%d-%T'
date: invalid date ‘+%Y/%b/%d-%T’
How can I read in the date and format it?