aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/print_os_info.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/print_os_info.sh')
-rwxr-xr-xscripts/print_os_info.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/print_os_info.sh b/scripts/print_os_info.sh
new file mode 100755
index 0000000..4d61c7b
--- /dev/null
+++ b/scripts/print_os_info.sh
@@ -0,0 +1,17 @@
+#!/bin/bash -x
+
+set -x
+
+OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
+OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
+KERNEL_OS=`uname -o`
+KERNEL_MACHINE=`uname -m`
+KERNEL_RELEASE=`uname -r`
+KERNEL_VERSION=`uname -v`
+
+echo KERNEL_OS: $KERNEL_OS
+echo KERNEL_MACHINE: $KERNEL_MACHINE
+echo KERNEL_RELEASE: $KERNEL_RELEASE
+echo KERNEL_VERSION: $KERNEL_VERSION
+echo OS_ID: $OS_ID
+echo OS_VERSION_ID: $OS_VERSION_ID