Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!apple!motcsd!hpda!hpcuhc!hpsemc!gph From: gph@hpsemc.HP.COM (Paul Houtz) Newsgroups: comp.unix.questions Subject: Re: sort question Message-ID: <810056@hpsemc.HP.COM> Date: 17 May 89 16:47:15 GMT References: <199448@hrc.UUCP> Organization: HP Technology Access Center, Cupertino, CA Lines: 23 chris@mimsy.UUCP (Chris Torek) writes: >In article <810054@hpsemc.HP.COM> gph@hpsemc.HP.COM (Paul Houtz) writes: >>... if you are reading from a file that has binary data in it, then it >>is possible that a newline character could appear in the binary data. >>This seems to me like it might be a problem. Sort would think it >>found the end of line. > >If your file is of binary data, you have more of a problem than that. >Sort(1) sorts ASCII text files, not binary files. (Numeric sorts are >done by conversion to and from numeric values.) What unix sort do you use if you have a data file with mixed binary and ascii fields? IBM has a number of sort utilities that will do this. The MPE and MPE XL sort utility handles this case fine. The VMS sort utility handles this too. Unless there is a sort utility on Unix that I haven't heard of, I don't think unix does this. (Please don't tell me that it isn't a good idea to mix ascii and binary data in the same file).