From 568d34b6270ab1b83dc49fc9c7c0a3dadc8ca58f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 24 Jun 2024 17:55:54 +0200 Subject: [PATCH] printenv/cut --- pidd.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pidd.sh b/pidd.sh index 9aa459f..5c3ce4d 100644 --- a/pidd.sh +++ b/pidd.sh @@ -42,7 +42,11 @@ pidd_main() { pidd_list_environment_variables() { pidd_step "List environment variables" - env | sort + for pidd_lev__name in $(printenv | cut -d = -f 1 | sort); do + pidd_lev__text="" + eval "pidd_lev__text=\"\${${pidd_lev__name}}\"" + echo "${pidd_lev__name}=${pidd_lev__text}" + done } pidd_list_working_directory() {