Skip to content

Instantly share code, notes, and snippets.

# as a one liner, just to say I told you so:
tail -f $HOME/.config/pianobar/out | sed 's/\x1b\[2K/\n/g' | gawk -v HOME="$HOME" ' BEGIN { i=0; while((getline line<"blacklist") > 0) songs[line]; } { for(song in songs) { if ( $0 == song ) { print "Skipping "song; print "n" > HOME"/.config/pianobar/ctl2"; } } } '
# With whitespace to make it easier to read:
tail -f $HOME/.config/pianobar/out |\
sed 's/\x1b\[2K/\n/g' |\
gawk -v HOME="$HOME" '
BEGIN{
i=0