Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Aug 1996 08:53:21 -0700 (MST)
From:      Don Yuniskis <dgy@rtd.com>
To:        rnordier@iafrica.com (Robert Nordier)
Cc:        dgy@rtd.com, tcg@ime.net, fqueries@jraynard.demon.co.uk, questions@FreeBSD.ORG
Subject:   Re: perhaps i am just stupid.
Message-ID:  <199608071553.IAA01784@seagull.rtd.com>
In-Reply-To: <199608071416.QAA00355@eac.iafrica.com> from "Robert Nordier" at Aug 7, 96 04:16:24 pm

next in thread | previous in thread | raw e-mail | index | archive | help
It seems that Robert Nordier said:
> Don Yuniskis wrote:
> > It seems that Gary Chrysler said:
> [...]
> > >          cksum %1.?? > %1.tmp
> > >          comp %1.sum %1.tmp
> > > 
> > > I belive this is what you meant. (That is if all the binarys have a
> > >  two digit extension)
> > 
> > But, it will hose you if foo.xx exists, etc.
> >  
> > > 	cksum %1.* > %1.tmp
> > > Would cause the .tmp and .sum to be cksum'ed.
> > > 
> > > 	cksum %1.0* > %1.tmp
> > > Whats the        ^.. for??
> 
> A "cksum %1.0*" won't work because the files have alpha extensions:
> "bin.aa" to "bin.cq", if memory serves.

Ooops!  Sorry, I'm using a "split" that creates three digit extensions
of the form ".[0-9][0-9][0-9]" and had (erroneously) assumed the
bin, sbin, etc. files were similarly named <:-)
 
> 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.

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.

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).

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...

--don



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608071553.IAA01784>