From 5e8dd6fec210315d4fb20e7c4d4ce38c155fea86 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 8 Jun 2024 13:24:43 +0200 Subject: [PATCH] cd_grep_os --- cd.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cd.sh b/cd.sh index 8c7e9c9..bb50c68 100644 --- a/cd.sh +++ b/cd.sh @@ -626,10 +626,10 @@ local variable="${1}" } cd_grep_os () { -local variable="${1}" - if [ "${variable}" ] ; then - grep "^${variable}=" "/etc/os-release" \ - | sed "s|^${variable}=||" \ + cd_grep_os__variable="${1}" + if [ "${cd_grep_os__variable}" ] ; then + grep "^${cd_grep_os__variable}=" "/etc/os-release" \ + | sed "s|^${cd_grep_os__variable}=||" \ | sed "s|^\"\(.*\)\"$|\1|" fi }