tchrist@convex.COM (Tom Christiansen) (01/18/91)
Nearly half of the posting in this group have been of a non-source nature. Please people: don't do that. This is a sources group. Only post sources. If you want to discuss them, post to alt.sources.d instead. Always use a followup-to line for those too stupid to do the right thing (we seem to have a lot of those lately.) I was strongly tempted to cancel all the non-source postings I just waded through. Fortunately, I resisted. :-) Instead I sent each author (whom I could respond to, that is) a short one-liner comically pointing out the impropriety of their posting. There's a reason this group works well and why it's not moderated. Please don't defeat those reasons. Is it time for a CFD to make it comp.sources.open? And just so I am not zapped for not practicing what I preach, here's a little script that points out executables in your path whose names occur more than once, you know, like /bin/mail and /usr/ucb/mail. --tom #!/usr/local/bin/perl # # pathclash -- find name classes # Tom Christiansen <tchrist@convex.com> $seen{'.'} = 1; for $dir (split(/:/, $ENV{'PATH'})) { if ($seen{$dir}++) { print STDERR "skipping duplicate directory $dir\n" unless $dir eq '.'; next; } #print STDERR "$dir\n"; if (!(chdir($dir) && opendir(DIR, '.'))) { warn "can't chdir to and opendir $dir: $!\n"; next; } for (readdir(DIR)) { next if $_ eq '..'; next unless -x && -f _; ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat(_); if ($files{$_, $dev, $ino}++) { #print STDERR "devino alias $_ in $dir\n"; next; } $bin{$_} .= ' ' . $dir; } } for (keys %bin) { next unless ($bin{$_} =~ tr/ / /) > 1; print $_, ":", $bin{$_}, "\n"; } -- "Hey, did you hear Stallman has replaced /vmunix with /vmunix.el? Now he can finally have the whole O/S built-in to his editor like he always wanted!" --me (Tom Christiansen <tchrist@convex.com>)