[comp.sys.mac.programmer] Does MPW's Sort tool work??

ldg@yoda.byu.edu (12/19/89)

The MPW Sort tool is supposed to, among other things, let you sort by
a range of columns in a line, a field within a line, or by a range of
columns within a field. Now, I can get the first two methods to work just
fine, but cannot for the life of me get MPW to sort using a range of
columns within a field as the key. For example, given a file full of
lines similar to the following:

HD:Data:Plots:ME1075_140.MSD
HD:Data:Plots:HX1075_35.MSD
HD:Data:Plots:ME1800_35.MDD

I would expect to be able to tell MPW something like the following:

sort -fs '.:' -f '4.3+4,4.8+2,4.1-2,5' filename > SortedFile

to sort the file by the four digit number (1800,1075) then the next (35,140)
number, then by the two-letter prefix, (ME,HX) and lastly by the file
extension (MSD,MDD). It doesn't work. No attempt at sorting takes place.
I can't even get

sort -fs '.:' -f '4.3+4' filename > SortedFile

to work. I have tried it with and without the quotes around the field
separator string ('.:') and even changing the colons and periods to spaces,
to no avail. What am I doing wrong? If anybody has gotten MPW (v 3.0) to
sort by subranges within a field, please, please, send me an example so
I will have some hope. Otherwise I will assume it is a bug and report it
as such.

Thanks in advance for any help.

Lyle D. Gunderson  N6KSZ          CIS: 73760,2354     GEnie: L.GUNDERSON
zebolskyd@acoust.byu.edu          "Any technology without some attendant risk
350 CB / BYU / Provo, UT 84602   of misuse is probably trivial"  --Loise Kohl