HI i have a file with data
--------------------------------------------------------
DESC: Baseline-Forwarding 2_PIMS_2_ONBOARD_PIC 1518B
DATE: 2007-07-18 03:48:54 ./j2320-baseline-forwarding-performance-1500B.pl 8.4R1.3 2007-07-14 00:57:53 UTC DUT sps2320a j2320
Expected PPS 70000 at 1518 packets
pps:144375 mbits:1753.29 wirebits:none min_lat:68.315 max_lat:805.175 avg_lat:482.3568800155
Port Configuration : 2 PIMS and 2 ONBOARD PIC
---------------------------------------------------------
DESC: Baseline-Forwarding 2_PIMS 66B
DATE: 2007-07-18 04:18:56 ./j2320-baseline-forwarding-performance-48B.pl 8.4R1.3 2007-07-14 00:57:53 UTC DUT sps2320a j2320
Expected PPS 220000 at 66 packets
pps:242578 mbits:128.081184 wirebits:none min_lat:12.265 max_lat:618.86 avg_lat:120.3188615163
Port Configuration : 2 PIMS
---------------------------------------------------------
DESC: NAT 2_PIMS_2_ONBOARD_PICS 1518B
DATE: 2007-07-18 06:15:09 ./j2320-nat-forwarding-performance-1500B.pl 8.4R1.3 2007-07-14 00:57:53 UTC DUT sps2320a j2320
Expected PPS 70000 at 1518 packets
pps:143750 mbits:1745.7 wirebits:none min_lat:73.97 max_lat:917.41 avg_lat:500.197639877
Port Configuration : 2 PIMS and 2 ONBOARD PICs
---------------------------------------------------------
DESC: NAT 2_PIMS 66B
DATE: 2007-07-18 06:53:33 ./j2320-nat-forwarding-performance-48B.pl 8.4R1.3 2007-07-14 00:57:53 UTC DUT sps2320a j2320
Expected PPS 80000 at 66 packets
pps:84687 mbits:44.714736 wirebits:none min_lat:15.82 max_lat:2121.62 avg_lat:144.322113815
Port Configuration : 2 PIMS
---------------------------------------------------------
DESC: SFW 2_PIMS_2_ONBOARD_PICS 1518B
DATE: 2007-07-18 04:54:22 ./j2320-sfw-forwarding-performance-1500B.pl 8.4R1.3 2007-07-14 00:57:53 UTC DUT sps2320a j2320
Expected PPS 70000 at 1518 packets
pps:143750 mbits:1745.7 wirebits:none min_lat:73.135 max_lat:630.74 avg_lat:425.249080415
Port Configuration : 2 PIMS and 2 ONBOARD PICS
---------------------------------------------------------
DESC: SFW 2_PIMS 66B
DATE: 2007-07-18 05:33:38 ./j2320-sfw-forwarding-performance-48B.pl 8.4R1.3 2007-07-14 00:57:53 UTC DUT sps2320a j2320
Expected PPS 80000 at 66 packets
pps:87187 mbits:46.034736 wirebits:none min_lat:15.78 max_lat:3148.62 avg_lat:143.5830413571
Port Configuration : 2 PIMS
---------------------------------------------------------
DESC: SFW+NAT 2_PIMS_2_ONBOARD_PICS 1518B
DATE: 2007-07-18 07:35:11 ./j2320-sfwnat-forwarding-performance-1500B.pl 8.4R1.3 2007-07-14 00:57:53 UTC DUT sps2320a j2320
Expected PPS 70000 at 1518 packets
pps:143750 mbits:1745.7 wirebits:none min_lat:76.775 max_lat:740.6 avg_lat:443.8299334945
Port Configuration : 2 PIMS and 2 ONBOARD PICs
---------------------------------------------------------
DESC: SFW+NAT 2_PIMS 66B
DATE: 2007-07-18 08:15:26 ./j2320-sfwnat-forwarding-performance-48B.pl 8.4R1.3 2007-07-14 00:57:53 UTC DUT sps2320a j2320
Expected PPS 75000 at 66 packets
pps:76875 mbits:40.59 wirebits:none min_lat:16.42 max_lat:1571.03 avg_lat:142.17509115465
Port Configuration : 2 PIMS
---------------------------------------------------------
my problem is based on the key version number i.e 8.4 R1 or 8.4 R2 or 8.4 R3 the block of data starting from DESC till '----' dashes is to be sorted.
I want a code in either C or C++ input is above text file o/p should be same text file with sorted data based on version number
Thnaks in Advance