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


Groups > linux.debian.user > #239035

Re: bbc script

From Greg Wooledge <greg@wooledge.org>
Newsgroups linux.debian.user
Subject Re: bbc script
Date 2021-08-19 14:40 +0200
Message-ID <CNPuW-16Z-7@gated-at.bofh.it> (permalink)
References <CNM41-7ca-1@gated-at.bofh.it> <CNPlf-13N-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Aug 19, 2021 at 08:25:10AM -0400, rhkramer@gmail.com wrote:
> On Thursday, August 19, 2021 04:59:19 AM Jude DaShiell wrote:
> > #!/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?

The "select" builtin command does it.  Read "help select" for the brief
version of the documentation.  (The man page's section isn't much larger,
though.)

Also relevant: https://mywiki.wooledge.org/BashFAQ/115

Back to linux.debian.user | Previous | Next — Previous in thread | 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