diff --git a/bw_cli_autolog.sh b/bw_cli_autolog.sh index 31b627f..698fa8f 100644 --- a/bw_cli_autolog.sh +++ b/bw_cli_autolog.sh @@ -72,7 +72,7 @@ identities_destroy() { pkill ssh-agent echo "Suppression des fichiers générés..." # shellcheck disable=SC2016 - grep -in 'printf "%s" "$BW_List"' "${HOME}"/.identities-loaded.sh | grep ">" | cut -d ">" -f 2 | sed -e "s,\~,${HOME},g ; s,\"\$HOME\",${HOME},g" | while IFS= read -r each; do + grep -in "printf.*\"\%s\".*\"\$BW_List\"" "${HOME}"/.identities-loaded.sh | grep ">" | cut -d ">" -f 2 | sed -e "s,\~,${HOME},g ; s,\"\$HOME\",${HOME},g" | while IFS= read -r each; do rm -rf "${each}" done unset BW_Session