Skip to content

Instantly share code, notes, and snippets.

@ihipop
Created June 17, 2024 02:38
Show Gist options
  • Save ihipop/4f5f200d77d561146c44f8a5c21eeb5a to your computer and use it in GitHub Desktop.
Save ihipop/4f5f200d77d561146c44f8a5c21eeb5a to your computer and use it in GitHub Desktop.
DMESG with human datetime
#!/bin/bash
# from https://stackoverflow.com/a/76260286
dmesg | awk -F ] '{"cat /proc/uptime | cut -d \" \" -f 1" | getline st;a=substr( $1,2, length($1) - 1);print strftime("%F %H:%M:%S %Z",systime()-st+a)" -> "$0}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment