From 0df300a11fe65f878c9ebb83da1179db8950647a Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 31 Aug 2023 12:27:43 +0200 Subject: [PATCH] Remove a usage of perl --- ctctl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctctl b/ctctl index 8482244..8af4324 100755 --- a/ctctl +++ b/ctctl @@ -237,7 +237,7 @@ logout_env(){ fi echo "Disconecting from ${CTCTL_DOMAIN} environment" vault token revoke -self - for VAR in $(printenv | perl -ne '/^((CTCTL|CONSUL|VAULT|NOMAD|LOKI)_[^=]+)=.*/ && print "$1\n"'); do + for VAR in $(printenv | grep -E '^(CTCTL|CONSUL|VAULT|NOMAD|LOKI)_' | sed -E 's/^((CTCTL|CONSUL|VAULT|NOMAD|LOKI)_[^=]+)=.*/\1/'); do unset $VAR done rm -f ~/.vault-token