Commands tagged radio (8)

  • This command lets you select from 10 different BBC stations. When one is chosen, it streams it with mplayer. Requires: mplayer with wma support.

    bbcradio() { local s PS3="Select a station: ";select s in 1 1x 2 3 4 5 6 7 "Asian Network an" "Nations & Local lcl";do break;done;s=($s);mplayer -playlist ""${s[@]: -1}".asx";}
    eightmillion · 2009-11-14 08:17:03 22
  • This is a very simple and lightweight way to play DI.FM stations For a more complete version of the command with proper strings in the menu, try: (couldnt fit in the command field above) zenity --list --width 500 --height 500 --title 'DI.FM' --text 'Pick a Radio' --column 'radio' --column 'url' --print-column 2 $(curl -s | awk -F '"' '/href="http:.*\.pls.*96k/ {print $2}' | sort | awk -F '/|\.' '{print $(NF-1) " " $0}') | xargs mplayer This command line parses the html returned from and display all radio stations in a nice graphical menu. After the radio is chosen, the url is passed to mplayer so the music can start dependencies: - x11 with gtk environment - zenity: simple app for displaying gtk menus (sudo apt-get install zenity on ubuntu) - mplayer: simple audio player (sudo apt-get install mplayer on ubuntu) Show Sample Output

    zenity --list --width 500 --height 500 --column 'radio' --column 'url' --print-column 2 $(curl -s | awk -F '"' '/href="http:.*\.pls.*96k/ {print $2}' | sort | awk -F '/|\.' '{print $(NF-1) " " $0}') | xargs mplayer
    polaco · 2010-04-28 23:45:35 12
  • This command asks for the station name and then connects to somafm, Great for those who have linux home entertainment boxes and ssh enabled on them, just for the CLI fiends out there ( I know I'm one of them ;) Also, don't forget to add this as alias(ie alias somafm="read -p 'Which Station? "; mplayer --reallyquite -vo none -ao sdl

    read -p "Which station? "; mplayer --reallyquiet -vo none -ao sdl${REPLY}.pls
    denzuko · 2009-05-04 00:26:19 16
  • Listen YouTube radios streaming. I use it on an alias to easily enter kinda flow state for study/programming. Show Sample Output

    streamlink --player="cvlc --no-video" "" 720p|& tee /dev/null
    pabloab · 2019-04-28 07:11:05 38
  • The solution to a year long (and extremely frustrating) problem I've had, caused by the fact that I only have one speaker; this command downmixes the stream to monophonic output, making sure I don't miss any of the music. NOTE: When stream is in .m3u format, a -playlist option is required, as shown below: mplayer -af pan=1:0.5:0.5 -channels 1 -playlist radiostream.m3u This command works great with aliases for various channels in .bashrc. Sample below: alias radio1='mplayer -af pan=1:0.5:0.5 -channels 1 radio1stream.pls'

    mplayer -af pan=1:0.5:0.5 -channels 1 radiostream.pls
    blabbingbanana · 2011-02-22 12:40:51 9
  • Ever wanted to stream your favorite podcast across the network, well now you can. This command will parse the iTunes enabled podcast and stream the latest episode across the network through ssh encryption. Show Sample Output

    curl -L -s `curl -s` | xmlstarlet sel -t -m "//enclosure[1]" -v "@url" -n | head -n 1` | ssh -t [user]@[host] "mpg123 -"
    denzuko · 2010-07-30 23:20:50 2
  • use get_iplay to download all listed content from run every night to make sure no episodes are missed

    get_iplayer --type=radio --channel "Radio 4 Extra" | grep : | awk '{ if ( NR > 1 ) { print } }'|sed 's/:.*//' |sed '$ d' > pidlist && while read p; do get_iplayer --get --fields=pid $p; done <pidlist && rm pidlist
    dunryc · 2016-01-16 17:20:54 6
  • This is the alias command that I discussed in my prior release which you can add to your ~/.bashrc. This command asks for the station name and then connects to somafm, Great for those who have linux home entertainment boxes and ssh enabled on them, just for the CLI fiends out there ( I know I'm one of them ;) You can find future releases of this and many more scripts at the teachings of master denzuko -

    alias somafm='read -p "Which station? "; mplayer --reallyquiet -vo none -ao sdl${REPLY}.pls'
    denzuko · 2009-05-05 12:13:46 2

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Check These Out

delay: a simple scheduler
the "delay" utility is an invaluable tool for me. with gnu-screen it allows you to schedule something and have it run and output to the current terminal, unlike "at". You can also use it like "sleep" with seconds and also with date: delay until 13:33 friday && echo test get it from: (author: Tom Rothamel)

Grep for word in directory (recursive)
greps for search word in directory and below (defaults to cd). -i case insensitive -n shows line number -H shows file name

Define a quick calculator function
defines a handy function for quick calculations from cli. once defined: $ ? 10*2+3

Extract all 404 errors from your apache accesslog (prefix lines by occurrences number)

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Get all mac address
Get mac address listed for all interfaces.

Route outbound SMTP connections through a addtional IP address rather than your primary

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

Open in TextMate Sidebar files (recursively) with names matching REGEX_A and not matching REGEX_B
This does the following: 1 - Search recursively for files whose names match REGEX_A 2 - From this list exclude files whose names match REGEX_B 3 - Open this as a group in textmate (in the sidebar) And now you can use Command+Shift+F to use textmate own find and replace on this particular group of files. For advanced regex in the first expression you can use -regextype posix-egrep like this: mate - `find * -type f -regextype posix-egrep -regex 'REGEX_A' | grep -v -E 'REGEX_B'` Warning: this is not ment to open files or folders with space os special characters in the filename. If anyone knows a solution to that, tell me so I can fix the line.

[vim] Clear trailing whitespace in file
% acts on every line in the file. \s matches spaces. \+ matches one or more occurrences of what's right behind it. Character '$' matches end-of-line.

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: