On Thursday, August 19, 2021 04:59:19 AM Jude DaShiell wrote:
> 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

I am not a bash expert (not even close), but I don't see where your selection 
(in PS3) gets transferred to REPLY -- shouldn't that happen somewhere 
explicitly?

Reply via email to