BL streaming MP3, was Re: [BL] Re: broken windows needs replacing
sindi keesan
keesan at sdf.lonestar.org
Fri Apr 22 20:02:57 EDT 2005
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
More information about the BasLinux
mailing list