[comp.lang.c] Sorting Binary data in C

oday@planck.uucp (Abdi M. Oday) (03/25/91)

I'm porting some VMS/fortran code to SUN-UNIX/FORTRAN.
One of the routines was formatting binary data using the VMS
sort routine.  The VMS sort routine supported binary data,
but I don't think the Unix sort utility does.

Has anyone done this before ?
Can anyone give me pointers on how I can sort binary data in Unix ?

    Thanks in advance.

    -Abdi

-- 
-----------------------------------------------------------------------
     --  Abdi M. Oday          -- oday@planck.UUCP                   --
     --  Calspan Corp.         -- oday%planck.uucp@acsu.buffalo.edu  --
     --  (716) 631-6848        --                                    --

torek@elf.ee.lbl.gov (Chris Torek) (03/25/91)

In article <1991Mar24.180156.11234@planck.uucp> oday@planck.uucp
(Abdi M. Oday) writes:
>I'm porting some VMS/fortran code to SUN-UNIX/FORTRAN.

If you want FORTRAN, why are you posting in comp.lang.c?  If you want
Unix information, why not some comp.unix newsgroup?

>One of the routines was formatting binary data using the VMS
>sort routine.  The VMS sort routine supported binary data,
>but I don't think the Unix sort utility does.

In one clause you talk about `routines' and in the next `utilities':
if you want `routines', ANSI C provides qsort()---which, despite the
name, is merely `a sort' and not necessarily `a quicksort'---and
qsort works on all, er, sorts of data.  If you want utilites, choose
a better newsgroup....
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427)
Berkeley, CA		Domain:	torek@ee.lbl.gov