Created
November 14, 2021 20:22
-
-
Save thejhh/057be2d186a46b151868ecf24c2bd18f to your computer and use it in GitHub Desktop.
bin/fix-log-timestamp.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while read LINE; do | |
TIME="$(echo "$LINE"|awk '{print $1}')" | |
FIXED_TIME="$(date -d "$TIME" '+[%d/%b/%Y:%H:%M:%S %z]')" | |
echo -n "$FIXED_TIME " | |
echo "$LINE"|sed -re 's/^[^ ]+ //' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment