+.config/yt-dlp.conf
[nethome.git] / bin / cherryfilter
1 #! /usr/bin/perl
2 use strict;
3 use warnings;
4 my $file;
5 while (<STDIN>) {
6   if (/^[^+-]/) {
7     $file=$_;
8     next;
9   }
10   my $match;
11   for my $arg (@ARGV) {
12     $match=1 if /\Q$arg\E/;
13   }
14   next if !$match;
15   if (defined $file) {
16     print $file;
17     $file=undef;
18   }
19   print;
20 }