Skip to content

Instantly share code, notes, and snippets.

@Phitherek
Created April 22, 2012 21:42
Show Gist options
  • Save Phitherek/2467104 to your computer and use it in GitHub Desktop.
Save Phitherek/2467104 to your computer and use it in GitHub Desktop.
A script that plays a Polish radio station RadioZet with MPlayer and offers server choice
#!/bin/bash
if [[ $# -ne 1 ]]
then
echo "Usage: $0 [server_number 03-40]"
else
if [ $1 != "03" ] && [ $1 != "04" ] && [ $1 != "05" ] && [ $1 != "06" ] && [ $1 != "07" ] && [ $1 != "08" ] && [ $1 != "09" ] && [[ $1 -lt 10 ]] || [[ $1 -gt 40 ]]
then
echo "Usage: $0 [server_number 03-40]"
else
mplayer http://radiozetmp3-$1.eurozet.pl:8400/
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment