I have a very long text file (from here) which should contain 6 hexadecimal characters then a 'break' (which appears as one character and doesn't seem to show up properly in the code markdown below) followed by a few words:
00107B Cisco Systems, Inc 00906D Cisco Systems, Inc 0090BF Cisco Systems, Inc 5080 Cisco Systems, Inc 0E+00 ASUSTek COMPUTER INC. 000C6E ASUSTek COMPUTER INC. 001BFC ASUSTek COMPUTER INC. 001E8C ASUSTek COMPUTER INC. 0015F2 ASUSTek COMPUTER INC. 2354 ASUSTek COMPUTER INC. 001FC6 ASUSTek COMPUTER INC. 60182E ShenZhen Protruly Electronic Ltd co. F4CFE2 Cisco Systems, Inc 501CBF Cisco Systems, Inc
I've done some looking around and can't see something which would work in this situation. My question is, how can I use
perl to delete all lines of this text file which do not start with exactly 6 hexadecimal characters and then a 'break'?
P.S. For bonus points, what's the best way of sorting the file alphabetically and numerically according to the hex characters (i.e.
FFFFFF)? Should I just use