Created
December 11, 2018 07:56
-
-
Save luxuia/1684eca74a4a8190fd8580efa84bdf84 to your computer and use it in GitHub Desktop.
add timestamp in log
This file contains 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
tail -f file | awk '{now=strftime("%F %T%z\t");sub(/^/, now);print}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment