Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!sdd.hp.com!uakari.primate.wisc.edu!aplcen!wb3ffv!wmark From: wmark@wb3ffv.ampr.org (Mark Winsor) Newsgroups: comp.unix.questions Subject: sorting Message-ID: <3828@wb3ffv.ampr.org> Date: 12 Apr 91 21:55:34 GMT Organization: Advanced Business Solutions - Baltimore , MD Lines: 24 I have to files that are in no particular order, but common numbers in one. Is there any way to sort the data in one file to be in the order of the other? One of these files can't be sorted because it is a pointer file and needs the record offsets to stay the same. Ex: File 1 File 2 ------ ------ I need file 2 to be: 100 100 500 500 500 100 300 500 300 500 300 300 Anybody have any ideas? (awk,shell,perl (which i'll get if i have to), or even a C algorythm) Thanks, Mark S. Winsor ProVAR, Inc.