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: sindi keesan <keesan AT sdf.lonestar.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 00:02:57 +0000 (UTC)

On Sat, 23 Apr 2005 3aoo-cvfd AT dea.spamcon.org wrote:

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.

This means I could type radio, then either wdav or 1 to start wdav?

But could I then also, without using 'radio' first, just type wdav?
I seem to be doing a lot of switching between stations when one stops playing and is busy afterwards, and don't want to always have to use the menu to choose.

I don't know how to write the above - is this shell scripting? What part of Dr. Linux would I look in for more info?



Cheers,
Steven

____________________________
http://www.basiclinux.com.ru
_______________________________________________
BasLinux mailing list
BasLinux AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/baslinux


keesan AT sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org




Archive powered by MHonArc 2.6.24.

Top of Page