scripts

misc scripts and tools
git clone git://git.2f30.org/scripts.git
Log | Files | Refs

radio (290B)


      1 #!/bin/sh
      2 
      3 # prints a list of matching stations from a "name;url" csv file
      4 # suitable for piping to mpc add
      5 
      6 STATIONS=$(test -n "$STATIONS" && echo "$STATIONS" \
      7 	|| echo $HOME/.stations.csv)
      8 
      9 NAME=$1
     10 
     11 # just print matches
     12 awk -F';' '{ print $2" # "$1; }' $STATIONS | grep "# .*${NAME}.*$"