blob: 5d8ee8250919a71fc1a1818feff7c5ea35cf130d (
plain) (
blame)
1
2
3
4
5
6
7
|
#!/bin/sh
# Print list of sls(1) hostnames that return 0 when a connection is attempted
# and the optional given command is run. Discard stdout, but preserve stderr.
sls | while read -r hostname ; do
ssh -nq -- "$hostname" "$@" >/dev/null || continue
printf '%s\n' "$hostname"
done
|