You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
207 B
11 lines
207 B
#!/bin/sh
|
|
|
|
hosts=$(get_hosts)
|
|
printf "%s" "$hosts" > "$1"
|
|
|
|
while sleep 2
|
|
do
|
|
current_hosts=$(get_hosts)
|
|
[ "$hosts" != "$current_hosts" ] && printf "%s" "$current_hosts" > "$1"
|
|
hosts=$current_hosts
|
|
done
|
|
|