dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles # fast
git clone https://src.adamsgaard.dk/dotfiles.git # slow
Log | Files | Refs | README | LICENSE Back to index

mpc-delete-pattern (175B)


      1 #!/bin/sh
      2 set -e
      3 
      4 if [ -z "$HOST" ]; then HOST=mini; fi
      5 
      6 mpc --host="$HOST" playlist | \
      7 awk -v pattern="$1" '{if (match($0, pattern)) {print NR}}' | \
      8 mpc --host="$HOST" del