I have a .txt file in which i got 7 columns of hex numbers. Every number is one byte, so every number is written with 2 characters. I Wanted to sum the first six columns (in hex), compare the last 2 characters (in hex) of the result with the 7th column and if it's not the same delete the row. I am using bash in linux so i think i'll need a pipe of commands to do the job.
A sample of the data is:
de 55 7a ff 41 4e 3b
.. .. .. .. .. .. .. .. .. .. ..
the sum of the first six numbers (in hex) is 33b and the "checksum" number is 3b, as the last 2 characters of the sum.