blob: 40c90ccda65d6b626d8ab5e1bfbb0854f6189646 [file] [log] [blame]
#!/bin/sh
AVAHI=avahi-browse
while getopts "a:" option
do
case $option in
a) AVAHI="$OPTARG" ;;
esac
done
cast_devices=
while IFS=";" read ip; do
cast_devices="$cast_devices $ip"
done<<EOT
$(timeout 10 $AVAHI -tpvlr _googlecast._tcp | grep "^=" | cut -d";" -f8 | sort)
EOT
echo "Cast responses from:$cast_devices"