From 76d3ffde1cbe86d1ee5b65492ea590d1d6d05f8e Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Thu, 4 Dec 2025 13:05:30 +0100 Subject: [PATCH] home/workmac: ssh-root-loop shell function --- home/scripts/ssh-loop-fc.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/home/scripts/ssh-loop-fc.nix b/home/scripts/ssh-loop-fc.nix index a632477..2508de6 100644 --- a/home/scripts/ssh-loop-fc.nix +++ b/home/scripts/ssh-loop-fc.nix @@ -8,6 +8,15 @@ for x in $1; do echo $x; ${pkgs.openssh}/bin/ssh $x.fcio.net -o StrictHostKeyChecking=no -C "$2"; done } + ssh-root-loop () { + setopt shwordsplit + local hosts=$1 + local cmd=$2 + + for x in $1; do echo $x; ${pkgs.openssh}/bin/ssh root@$x.fcio.net -o StrictHostKeyChecking=no -C "$2"; done + } + + ssh-loop-parallel () { setopt shwordsplit local hosts=$1