From dc2ff95900291f951704ef3d4c595e3e920c7d67 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 6 Apr 2023 21:48:22 +0200 Subject: [PATCH] sys_model() Add new line, exit from awk after one print --- etc/profile.d/sys.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/profile.d/sys.sh b/etc/profile.d/sys.sh index b565ac9f..0bc8cd6f 100644 --- a/etc/profile.d/sys.sh +++ b/etc/profile.d/sys.sh @@ -48,9 +48,9 @@ sys_model() { ;; *) if [ -e /proc/device-tree/model ]; then - tr -d '\000' < /proc/device-tree/model + tr -d '\000' < /proc/device-tree/model && echo elif which lshw > /dev/null; then - lshw -quiet -class system 2>/dev/null | awk -F': ' '/product: /{print $2}' + lshw -quiet -class system 2>/dev/null | awk -F': ' '/product: /{print $2; exit}' fi ;; esac -- 2.47.3