Created
July 17, 2019 16:42
-
-
Save sasrai/0f1ffdca9868be74a2f96c474023aa8f to your computer and use it in GitHub Desktop.
Ubuntuのdmesg自動更新表示スクリプト
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
#!/bin/sh | |
while true | |
do clear | |
date | |
esc=$(printf '\033') | |
dmesg --color=always --time-format iso | grep -vE "(cbr0|IPv6|audit|promiscuous mode)" | tail -15 | sed "s/,[0-9]\{6\}+0900 / /g" | sed "s/^[^ ]*\([0-9]\{4\}-[01][0-9]-[0-3][0-9]\)T\([^ ]\+\) /${esc}[32m[\1 \2] /g" | |
sleep 15 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment