sort question

Paul Houtz gph at hpsemc.HP.COM
Wed May 17 03:04:49 AEST 1989


chris at mimsy.UUCP (Chris Torek) writes:

>In article <810050 at hpsemc.HP.COM> gph at hpsemc.HP.COM (Paul Houtz) writes:
>>Right.  There is no way to do a true column sort using this utility as you
>>can on IBM or MPE systems and here is why:   Sort requires a FIELD DELIMITER
>>character.   That means that there is SOME character that will never be 
>>sorted.
>
>But (as you yourself point out) you can set the field delimiter to
>newline, effectively making it vanish, then use the 0.n format to
>specify column n.

   Wouldn't it be nice if the whole world spoke Unix.  It would make any
minor user Unfriendliness seem like such a minor issue.  Oh well.  Unfortunately
there will probably always be systems out there that need to talk to non-
unix systems.    
  
   The problem with having to set the field delimiter is that you have to
decide what to set it TO.  Now, 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.

   I can write a sort program that will do this column sorting for me, but
what a pain.  It's too bad there isn't one for unix, like there is for 
all the other major operating systems.

   (On the other hand, I'll be that some third party out there has already
written a true column sort for unix.  I just haven't found it yet.  Any
takers?)



More information about the Comp.unix.questions mailing list