Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #239023

bbc script

From Jude DaShiell <jdashiel@panix.com>
Newsgroups linux.debian.user
Subject bbc script
Date 2021-08-19 11:00 +0200
Message-ID <CNM41-7ca-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


I tested the following script by having the $REPLY variable report its
value after the select statement and the value I entered was correct.
The problem I'm having is with the case statement I used.  For some reason
the case statement isn't playing any of the stations and I have mpv on my
machine.
Have we got any case statement experts who wouldn't mind examining this
script and sending me a few pointers?
I have many other scripts with radio stations in them and if I can get
this technique working I'll be able to roll those into a single script
correctly:
Cut here.
#!/usr/bin/env bash
# file: bbc.sh
PS3="Enter a number to Choose station: "
select station in bbc1 bbc-1-extra bbc-2 bbc-3 bbc-4 \
		       b		  bc-4-long-wave-and-shipping bbc-4-extra bbc-5 \
bbc-6-music bbc-world-service quit
do
    case $REPLY in
        $REPLY==1)
	     mpv http://open.live.bbc.co.uk/mediaselector/5/select/mediaset/http-icy-mp3-a/format/pls/proto/http/vpid/bbc_radio_one.pls
	     ;;

	 $REPLY==2)
		mpv http://open.live.bbc.co.uk/mediaselector/5/select/mediaset/http-icy-mp3-a/format/pls/proto/http/vpid/bbc_1xtra.pls
		;;

	      $REPLY==3)
		     mpv http://open.live.bbc.co.uk/mediaselector/5/select/mediaset/http-icy-mp3-a/format/pls/proto/http/vpid/bbc_radio_two.pls
		     ;;

		   $REPLY==4)
			  mpv http://open.live.bbc.co.uk/mediaselector/5/select/mediaset/http-icy-mp3-a/format/pls/proto/http/vpid/bbc_radio_three.pls
			  ;;

			 			$REPLY==5)
						       mpv http://open.live.bbc.co.uk/mediaselector/5/select/mediaset/http-icy-mp3-a/format/pls/proto/http/vpid/bbc_radio_fourfm.pls
						       ;;

			     $REPLY==6)
				    mpv http://open.live.bbc.co.uk/mediaselector/5/select/mediaset/http-icy-mp3-a/format/pls/proto/http/vpid/bbc_radio_fourlw.pls
				    ;;

				    				  $REPLY==7)
									 mpv http://stream.live.vc.bbcmedia.co.uk/bbc_radio_four_extra
									 ;;

									 				       $REPLY==8)
														      mpv http://stream.live.vc.bbcmedia.co.uk/bbc_radio_five_live_online_nonuk
														      ;;

														      $REPLY==9)
															     mpv http://stream.live.vc.bbcmedia.co.uk/bbc_6music
															     ;;

															     $REPLY==10)
																     mpv http://stream.live.vc.bbcmedia.co.uk/bbc_world_service
																     ;;

																     $REPLY==11)
																	     exit 0
																	     ;;

																	     																     esac
															     done

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

bbc script Jude DaShiell <jdashiel@panix.com> - 2021-08-19 11:00 +0200
  Re: bbc script "Thomas Schmitt" <scdbackup@gmx.net> - 2021-08-19 11:40 +0200
    Re: bbc script Jude DaShiell <jdashiel@panix.com> - 2021-08-19 19:10 +0200
  Re: bbc script rhkramer@gmail.com - 2021-08-19 14:30 +0200
    Re: bbc script Greg Wooledge <greg@wooledge.org> - 2021-08-19 14:40 +0200
      Re: bbc script Jude DaShiell <jdashiel@panix.com> - 2021-08-20 01:50 +0200
        Re: bbc script Greg Wooledge <greg@wooledge.org> - 2021-08-20 03:00 +0200
          Re: bbc script <tomas@tuxteam.de> - 2021-08-20 09:40 +0200
    Re: bbc script "Thomas Schmitt" <scdbackup@gmx.net> - 2021-08-19 15:10 +0200

csiph-web