SLBR/sendmsg.sh

10 lines
185 B
Bash
Executable File

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