Quantcast
Channel: Active questions tagged bash+awk - Ask Ubuntu
Viewing all articles
Browse latest Browse all 102

How to remove the first colon ':' from a timestamp?

$
0
0

I am new to programming!!

Can anyone help to remove the : at the first position in a timestamp: :29.06.2019 23:03:17

Presently I am trying to do it using awk/cut commands as shown below:

TDS="$(grep 'Logfile started' process.log |  awk '{print $3,$4}' | cut -d: -f2)"
echo "$TDS"


29.06.2019 23

And the output is not what I wanted! I want to print it as 29.06.2019 23:03:17.


Viewing all articles
Browse latest Browse all 102