I have a file with data: [15:29:58.496640][15:29:58.496644][15:29:58.496665][15:29:58.496682][15:29:58.497096][15:29:58.498621]I want the output in milliseconds using awk on CentOS.For example:15:29:58.496640 -> 1499421598.496code tried:awk '{gsub(/[][]/,);a=$1;x='`date -d a +'%s.%3N'`'; print x  a}' file
Conversion of specifc time to milliseconds using AWK
text processing;awk;date
Made changes to existing code:day=$(date +%d-%b-%y)awk -v var=$day 'BEGIN{cmd=date +%s.%6N -d } {gsub(/[][]/,);a=varFS$1;cmd a|getline var1;print var1;}' file