Dmesg wrapper function

This commit is contained in:
David Tomaschik
2021-03-24 13:28:45 -07:00
parent 3afee0505b
commit b3eb8a8e44

View File

@@ -0,0 +1,9 @@
function dmesg {
if [ $(id -u) -eq 0 ] ; then
command dmesg "$@"
elif id | grep -q '(sudo)' ; then
sudo dmesg "$@"
else
command dmesg "$@"
fi
}