#!/usr/bin/perl -w use strict; use warnings; my($cmd) = shift @ARGV || die <<__MORT__; Nothing to search for. Invoke this program with the command name or p +art of the command name for which you want to search in your \$PATH. usage: $0 [command to search for in \$PATH] __MORT__ foreach (split(/:/,$ENV{'PATH'})) { print qq[IN "$_"\n], (`ls ${\quotemeta $_}|grep $cmd`||"[none]\n"), + "--\n\n" }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: find a forgotten shell command
by dominix (Deacon) on Jan 07, 2004 at 02:10 UTC | |
by Tommy (Chaplain) on Jan 07, 2004 at 03:13 UTC | |
by dominix (Deacon) on Jan 07, 2004 at 03:55 UTC | |
by Tommy (Chaplain) on Jan 07, 2004 at 22:54 UTC | |
Re: find a forgotten shell command (use apropos)
by grinder (Bishop) on Jan 07, 2004 at 09:10 UTC | |
by b10m (Vicar) on Jan 07, 2004 at 11:53 UTC |