Reputation: 101
I am trying to convert ProcessedTime": 1545166011.794351 to a date using date function in bash script, what is the best way to convert it ?
Upvotes: 0
Views: 45
Reputation: 88563
With GNU awk:
echo 154166011.794351 | awk '{print strftime("%Y-%m-%d %H:%M:%S",$0)}'
Output:
1974-11-20 08:53:31
Source: https://unix.stackexchange.com/a/168317/74329
Upvotes: 1