I use for Win32, Linux, SunOS machines quite often with conjuction of other tool, about which I also will tell.
Regards,
Vadim.
#!/usr/bin/perl my @dirs = split(($^O eq 'MSWin32'?';':':'), $ENV{PATH}); for (0..$#dirs) { if (-d $dirs[$_]) { print " "; } else { print "??"; } print (((-d $dirs[$_])?" ":"??"),(exists $_{$dirs[$_]}?"=":" "),(sp +rintf "%3d. ",$_+1)); $_{$dirs[$_]}++; print $dirs[$_],"\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: nice PATH printing
by jsprat (Curate) on Apr 25, 2002 at 21:04 UTC |