SLBR/sendmsg.sh

10 lines
196 B
Bash
Executable File

#!/bin/bash
function send {
ADDRESSES=$(lxc list | cut -f 4 -d '|' \
| grep -Eo "[0-9]*\\.[0-9]*\\.[0-9]*\\.[0-9]*")
for ADDRESS in $ADDRESSES
do
echo "$1" | nc -q2 "$ADDRESS" 9090
done
}