$ perl -nle '$ARGV eq $O && next;!/logging/&&($O=$ARGV)&&print $O' -- files/*