From af77462313409ccc6db438c1f51a2cab0f879cd2 Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Fri, 13 Jun 2014 08:42:30 +0400 Subject: [PATCH] ajouter la variable exec --- ussh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ussh b/ussh index efd8b9b..9cb67fc 100755 --- a/ussh +++ b/ussh @@ -64,7 +64,7 @@ Les options suivantes sont exclusives à ce script: permettent d'effectuer la connexion à partir d'un autre script. Exemple: "'eval "$(ussh --parse args...)" for host in "${hosts[@]}"; do - "$ssh" "${options[@]}" "$host" "${args[@]}" + ${exec:+exec} "$ssh" "${options[@]}" "$host" "${args[@]}" done'"" } @@ -185,7 +185,9 @@ function remove_keys() { } function show_vars() { + [ "${#hosts[*]}" -gt 1 ] && exec= set_var_cmd ssh "$SSH" + set_var_cmd exec "$exec" set_array_cmd options SSHOPTS set_array_cmd hosts set_array_cmd args @ "$@"