Remove a usage of perl

This commit is contained in:
Daniel Berteaud 2023-08-31 12:27:43 +02:00
parent 9aa66a32af
commit 0df300a11f
1 changed files with 1 additions and 1 deletions

2
ctctl
View File

@ -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