#!/usr/bin/perl # Lists commands on the path that contain the given regular expression. # # USAGE: # comgrep.pl my $r = shift() // ''; -X -f && substr($_,1+rindex$_,'/')=~/$r/o && print"$_\n"for(map{glob"$_/*"}split/:/,$ENV{PATH});