From owner-freebsd-questions Wed Aug 7 11:53:17 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA28932 for questions-outgoing; Wed, 7 Aug 1996 11:53:17 -0700 (PDT) Received: from eac.iafrica.com (196-7-192-145.iafrica.com [196.7.192.145]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id LAA28925 for ; Wed, 7 Aug 1996 11:53:10 -0700 (PDT) Received: (from rnordier@localhost) by eac.iafrica.com (8.6.12/8.6.12) id UAA00545; Wed, 7 Aug 1996 20:50:11 +0200 From: Robert Nordier Message-Id: <199608071850.UAA00545@eac.iafrica.com> Subject: Re: perhaps i am just stupid. To: dgy@rtd.com (Don Yuniskis) Date: Wed, 7 Aug 1996 20:50:10 +0200 (SAT) Cc: rnordier@iafrica.com, dgy@rtd.com, tcg@ime.net, fqueries@jraynard.demon.co.uk, questions@FreeBSD.ORG In-Reply-To: <199608071553.IAA01784@seagull.rtd.com> from "Don Yuniskis" at Aug 7, 96 08:53:21 am X-Mailer: ELM [version 2.4 PL24 ME8a] Content-Type: text Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Don Yuniskis wrote: > > However there seems to be another underlying assumption: that MS-DOS > > expands wildcards in alpha-sorted sequence. It doesn't. File > > "bin.bz" (say) may just as well be processed before "bin.aa". So > > a "comp" without an intervening "sort" won't work. > > Right. DOS tends to serve things up in "directory order". My assumption > was that the files would have been ftp'ed in alpha order and, thus, present > in the directory in that order! > > > Another complication: DOS "sort" is little-used, broken, and may > > not be in the PATH. > > \DOS is usually in the PATH and SORT should be therein. I agree that SORT usually will be available, and may be in c:\dos. I'd be hesitant to actually _assume_ that in a utility, though. For instance, the system I'm using now has SORT in d:\windows\command (as installed by Windows 95 setup). On someone else's system, set up for GNU C development, two incompatible implementations of SORT are in d:\bin and c:\dos, and the non-DOS version has precedence in the PATH. > How far back (e.g., DOS 1.0?) should we support this? I would imagine > 5.0 or 3.3 to be the "oldest" we'd need to support (??) I'll try to > dig up earlier versions to verify. SORT goes way back on DOS. However, older versions of DOS never had an install routine, so files could (and frequently did) end up in strange places. Also the DOS sort is seriously brain dead (a better phrase than "broken", which I used previously). So the SORT in the path may not belong to DOS, or respond to the same syntax. > Another hack would be to use DIR to create a (sorted) file list > but piping that into CKSUM would probably choke, too (since > DOS is so brain dead). You're right, this isn't a standard MS-DOS capability. > I'd really like to avoid writing some DOS-specific utility to > do this as it seems like bogus code to maintain. I'd rather > see *no* globbing and list everything explicitly... On principle, I'd agree. Though I'm not sure whether it would be necessary to maintain the code at all. MS-DOS still runs DOS 1.xx binaries; and 'cksum' produces a standard 32-bit CRC which isn't going to change anytime soon. So maybe, in this particular case, a DOS-specific utility would be more robust. I actually have a DOS utility somewhere that does 32-bit CRCs and even does limited ASCII-sequenced globbing (eg. "bin.[a-c]?"). It was done for a company whose support people needed to check for corrupt/incompatible binaries over the phone. I suppose I could dig it out and submit it, if no-one comes up with a preferred solution. -- Robert Nordier