in reply to Pathfinder - find duplicate (shadowed) programs in your PATH
Currently, the code only filters out the specially-name directories (. and ..). I adapted the code to filter out all directories which are sub-directories of each PATH directory. Also, I filter out all files which do not have execute permissions.
To add these filters, change:
sort grep !/^\.\.?$/,
to:
sort grep {-x "$dir/$_"} grep {! -d "$dir/$_"}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Pathfinder - find duplicate (shadowed) programs in your PATH
by parv (Parson) on Jul 21, 2009 at 04:17 UTC | |
by toolic (Bishop) on Jul 22, 2009 at 01:37 UTC | |
by parv (Parson) on Jul 22, 2009 at 12:02 UTC |