#!/bin/bash shopt -s nullglob for file in *.pm; do if pkgfile "$file" | grep -q 'local/perl'; then printf '%s is duplicated\n' "$file" fi don