Skip to content

Instantly share code, notes, and snippets.

@blacknon
Last active January 30, 2023 01:41
Show Gist options
  • Save blacknon/f19d1e94b5f89f3e1fef520d3ecc7b59 to your computer and use it in GitHub Desktop.
Save blacknon/f19d1e94b5f89f3e1fef520d3ecc7b59 to your computer and use it in GitHub Desktop.
Add time stamp to terminal log of script command
script -fq >(awk '{print strftime("%F %T ") $0}{fflush()}'>> PATH) # Linux
script -Fq >(awk '{print strftime("%F %T ") $0}{fflush()}'>> PATH) # Mac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment