Skip to Content.
Sympa Menu

baslinux - Re: BL streaming MP3, was Re: [BL] Re: broken windows needs replacing

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: 3aoo-cvfd AT dea.spamcon.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: BL streaming MP3, was Re: [BL] Re: broken windows needs replacing
  • Date: Sat, 23 Apr 2005 07:13:56 +1200

sindi keesan wrote:
>
> I have made aliases for playing five radio stations with
> mpg123 and since I cannot recall all the station names,
> I made a small script: echo 'wdav 24k, kcme 32k,......'
> (chmod +x) and called it radio, and put it on the path.

Why don't you do a menu? Something as simple as
this should work:
--------------------------------------------
select i in wdav kcme wabc wxyz; do $i; done
--------------------------------------------

For a fancier menu, you could use "read" and "case".
Have a look inside the "pppsetup" or "mail" scripts
to see how this is done.

> I put it, with sound-on, cdr-on, zip-on, scanner-on, etc.,
> in /usr/local/sbin.

There is no need for all those aliases when you have
a proper menu (using read/case).

> I type radio for a list of stations, then type the station name.

You could call your menu script "radio" and then type
a number (or letter) to run the station.

> Is there a better way of doing this which would still
> let me type the radio station call name, but also let
> me just type its number after viewing a menu?

In the case statement, you can specify options by putting
a | between them. For example:
----------------------------------
case $answer in
wdav|1)
[your command(s) to start wdav]
;;
kcme|2)
[your command(s) to start kcme]
;;
esac
----------------------------------

That lets you use either the number or name to choose.


Cheers,
Steven

____________________________
http://www.basiclinux.com.ru




Archive powered by MHonArc 2.6.24.

Top of Page