sorting

Mark Winsor wmark at wb3ffv.ampr.org
Sat Apr 13 07:55:34 AEST 1991


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.



More information about the Comp.unix.questions mailing list