Cлушаем онлайн радио используя всем известный mplayer.

#!/bin/bash
########################################################
# cli_radio #
# based on IceFox radio-select script #
########################################################
# set colors
RED='\e[41m'
BLUE='\e[44m'
CYAN='\e[46m'
NC='\e[0m'
# set player
PLAYER="/usr/bin/mplayer"
# verify if $PLAYER is installed
if [ -e $PLAYER ]; then
# stop current $PLAYER session
if [ "$(pidof mplayer)" ]; then
killall mplayer
fi
while true; do
clear
echo ""
echo " ·····················································"
echo " · select a station and play ·"
echo " · ·"
echo -e " · $CYAN[space]$NC to pause, $CYAN[q]$NC to stop, $CYAN[Ctrl]+[c]$NC to quit ·"
echo " ·····················································"
echo ""
echo " ·································································"
echo -e " · $BLUE 1 $NC Groove Salad $BLUE 2 $NC Lush ·"
echo -e " · $BLUE 3 $NC Earwaves $BLUE 4 $NC Deap Space One ·"
echo -e " · $BLUE 5 $NC Drone Zone $BLUE 6 $NC Pop Tron ·"
echo -e " · $BLUE 7 $NC Def Con $BLUE 8 $NC Dub Step Beyond ·"
echo -e " · $BLUE 9 $NC Space Station Soma $BLUE 10 $NC Mission Control ·"
echo -e " · $BLUE 11 $NC Indie Pop Rocks! $BLUE 12 $NC Folk Forward ·"
echo -e " · $BLUE 13 $NC BAGel Radio $BLUE 14 $NC Digitalis ·"
echo -e " · $BLUE 15 $NC Sonic Universe $BLUE 16 $NC Secret Agent ·"
echo -e " · $BLUE 17 $NC Suberbs of Goa $BLUE 18 $NC Boot Liquor ·"
echo -e " · $BLUE 19 $NC Illinois St. Lounge $BLUE 20 $NC The Trip ·"
echo -e " · $BLUE 21 $NC cliqhop idm $BLUE 22 $NC Covers ·"
echo -e " · $BLUE 23 $NC Beat Blender $BLUE 24 $NC Doomed ·"
echo -e " · $BLUE 25 $NC Black Rock FM $BLUE 26 $NC SF 10-33 ·"
echo -e " · $BLUE 27 $NC custom link... $BLUE 28 $NC custom link... ·"
echo " ·································································"
echo ""
echo -e " select a $BLUE number $NC from 1 to 26 then hit $CYAN[Enter]$NC"
echo ""
read choix
case $choix in
1)
$PLAYER http://uwstream1.somafm.com:80
;;
2)
$PLAYER http://sfstream1.somafm.com:8800
;;
3)
$PLAYER http://sfstream1.somafm.com:5100
;;
4)
$PLAYER http://sfstream1.somafm.com:2800
;;
5)
$PLAYER http://uwstream2.somafm.com:80
;;
6)
$PLAYER http://sv1.vestaradio.com:7420
;;
7)
$PLAYER http://sfstream1.somafm.com:2200
;;
8)
$PLAYER http://sfstream1.somafm.com:6200
;;
9)
$PLAYER http://uwstream2.somafm.com:2666
;;
10)
$PLAYER http://sfstream1.somafm.com:2020
;;
11)
$PLAYER http://sfstream1.somafm.com:8090
;;
12)
$PLAYER http://sfstream1.somafm.com:7400
;;
13)
$PLAYER http://sfstream1.somafm.com:9090
;;
14)
$PLAYER http://sfstream1.somafm.com:8900
;;
15)
$PLAYER http://sfstream1.somafm.com:8850
;;
16)
$PLAYER http://uwstream2.somafm.com:9016
;;
17)
$PLAYER http://sfstream1.somafm.com:8850
;;
18)
$PLAYER http://sfstream1.somafm.com:7000
;;
19)
$PLAYER http://sfstream1.somafm.com:8500
;;
20)
$PLAYER http://sfstream1.somafm.com:2504
;;
21)
$PLAYER http://uwstream2.somafm.com:2668
;;
22)
$PLAYER http://sfstream1.somafm.com:8700
;;
23)
$PLAYER http://sfstream1.somafm.com:8384
;;
24)
$PLAYER http://sfstream1.somafm.com:8300
;;
25)
$PLAYER http://sfstream1.somafm.com:8040
;;
26)
$PLAYER http://uwstream2.somafm.com:2040
;;
27)
echo ""
echo "put your custom link here"
echo ""
read customlink
$PLAYER $customlink
;;
28)
echo ""
echo "put your custom link here"
echo ""
read customlink
$PLAYER $customlink
;;
*)
echo -e "$RED wrong choice $NC"
echo "try again..."
echo ""
sleep 2
clear
;;
esac
done
else
echo " this script need mplayer"
echo " install it or change the PLAYER"
echo "exiting ..."
exit 0
fi