Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!sun-barr!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!lll-winken!uwm.edu!psuvax1!rutgers!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: alt.sources.d Subject: Re: "Simple" but non-portable == useless. Message-ID: <24410:Jan3021:56:3291@kramden.acf.nyu.edu> Date: 30 Jan 91 21:56:32 GMT References: <7628@sugar.hackercorp.com> <11306:Jan2817:58:5291@kramden.acf.nyu.edu> <27A5C105.1019@tct.uucp> Organization: IR Lines: 16 In article <27A5C105.1019@tct.uucp> chip@tct.uucp (Chip Salzenberg) writes: > So maybe Karl did it the long way. Here's my version of pathdup in > Perl, and it's only ten lines long: Chip, you just typed ten lines of perl, including a few hundred characters, to achieve basically the same effect as $ ls -F `echo $PATH | tr : '\012'` | sed -n 's/\*$//p' | sort | uniq -d or, in csh, % ls -F $path | sed -n 's/\*$//p' | sort | uniq -d Are you sure you're spending your programming time wisely? ---Dan