beejayf wrote: > > I tried: > > > Code: -------------------- > > telnet <mymediaserver> <port> > <MAC adress> power ? > exit -------------------- > > > > and this returns a 1 or a 0 for the status - thanks for putting me on > the right track! > > Any quick solution for doing this automatically? > > Thanks in advance!
Hi, just take a look into some [not so] older Thread inside the Linux edge here... > > > #!/bin/bash > server=localhost > port=9090 > > playerID=$(printf "player id ?\nexit\n" | nc $server $port | cut -d ' ' > -f 4 | > power=$(printf "$playerID power ?\nexit\n" | nc $server $port | cut -d ' > ' -f 3 > > case $power in > 0) echo player $playerID is offline ;; > 1) echo player $playerID is online ;; > esac > > If you just want to check only one special Player - let that run one time and change the line line that set the var "playerID" with the output from your playerID. Gruss Jan ------------------------------------------------------------------------ DJanGo's Profile: http://forums.slimdevices.com/member.php?userid=1516 View this thread: http://forums.slimdevices.com/showthread.php?t=99977 _______________________________________________ unix mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/unix
