From e6d613ed3d5ca0e0409abd9ac884b05377f2a37e Mon Sep 17 00:00:00 2001 From: Jan Schnackenberg Date: Thu, 27 Mar 2025 08:13:48 +0100 Subject: [PATCH] #1 grep -P not available In some grep packages, PCRE support is not enabled This commit changes the "keys" method to only use basic RE syntax and sed instead of grep with PCRE syntax --- shell_map.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell_map.sh b/shell_map.sh index ceb711c..d52a655 100755 --- a/shell_map.sh +++ b/shell_map.sh @@ -34,7 +34,7 @@ shell_map () { printf '%s' "${!VALUE}" ;; keys) - declare | grep -Po "(?<=${FUNCNAME}_DATA_)\w+((?=\=))" + declare | grep -o "${FUNCNAME}_DATA_[^=]*" | sed "s/^${FUNCNAME}_DATA_//" ;; name) echo $FUNCNAME