2 # Published under the terms of the GNU General Public License (GPL).
8 sed -e "s
/^
$KEY\s
*=\s
*//" <<<"`
9 grep -oE "^$KEY[ ]*=[ ]*[^ ]+" $HOME/.shell-fm/shell-fm.rc \
18 echo "Usage: shell-fm-tune lastfm://radio_url [HOST [PORT]]"
31 if [ $# -gt 2 ]; then PORT
="$3"; fi
32 elif [ -r "$HOME/.shell-fm/shell-fm.rc" ]; then
34 PORT
="`extract "port
"`"
38 if [ -n "`which nc 2>/dev/null`" ]; then
40 elif [ -n "`which telnet`" ]; then
43 echo "Netcat or telnet must be installed!"
47 [ -z "$IP" ] && IP
="127.0.0.1"
48 [ -z "$PORT" ] && PORT
="54311"
50 echo "play $RADIO" |
"$CMD" "$IP" "$PORT" >/dev
/null
2>&1