1 parent b5705cc commit 1627e9eCopy full SHA for 1627e9e
1 file changed
ssher
@@ -0,0 +1,29 @@
1
+#!/bin/bash
2
+
3
+IFS=',' read -a ips <<< "$1"; shift
4
+commands="cd irsec2025"
5
+echo "${ips[@]}"
6
7
+for ip in "${ips[@]}"; do
8
+ echo $ip
9
+done
10
11
+for arg in "$@"; do
12
+ echo $arg
13
+ if [ "$arg" = "r" ] || [ "$arg" = "c" ] || [ "$arg" = "clean" ]; then
14
+ for ip in "${ips[@]}"; do
15
+ ssh "$ip" "rm -rf irsec2025"
16
+ done
17
+ elif [ "$arg" = "i" ] || [ "$arg" = "install" ]; then
18
19
+ scp -qr $(pwd) "$ip":
20
21
+ else
22
+ commands+="; echo; $arg"
23
+ fi
24
25
26
27
+ ssh -t "$ip" "$commands"
28
29
0 commit comments