I have a file like this
Sampleoutput1[Fri Jun 10 06:11:59 2016]Local/ESSBASE0///139929633446208/Error(10
Sampleoutput1Local/ESSBASE0///139929633446208/[Fri Jun 11 06:11:59 2016]Error(10
I need to extract date field and add this date as column with delimited ($).Date can be present anywhere in the file.
[Fri Jun 10 06:11:59 2016]$Sampleoutput1[Fri Jun 10 06:11:59 2016]Local/ESSBASE0///139929633446208/Error(10
[Fri Jun 11 06:11:59 2016]$Sampleoutput1Local/ESSBASE0///139929633446208/[Fri Jun 11 06:11:59 2016]Error(10
grep -o '\[\(\w\{3\} \)\{2\}[0-9: ]\{14,16\}\]'
didn't satisfy you? – Costas Aug 01 '16 at 21:00