less and od disagree on file organization
Greetings
I have uncovered a strange problem with a text file (or maybe it's not). I am troubleshooting an application (blastall, for searching genomic sequence data) where some of the input goes missing (negative search results are reported, so there should be an output record for every input record). Each record of the input file looks like:
>ID#
data
>Next_ID#
more_data
etc.
so that the file has a definite ordering that can be checked. If I use cat\less\awk to look at the file I see things in a particular order. If I use od -c to look at the file, the ordering is completely different in places with whole blocks switched around. How can that be? I suspect it's the root of the problem I see with the application since the records that are out-of-order relative to od are the problem records in the blastall application. Any suggestions will be gratefully appreciated. I can send a copy of the file if anyone is interested.
Thanks
Mike
od and less agree on sorted files
Quote:
Originally Posted by rcgreen
Less is a text oriented tool and may "interpret"
the data before displaying it. od is probably telling
the truth. You should have some sort of hex/binary
editor on your system to give you another view,
otherwise go ahead and post the file if you can,
and we'll analyze it. If it is supposed to be text
and contains binary data, maybe it's confusing
your program.
:cool:
Thanks for the help. I sorted the file and less and od agreed on the organization, and the application I was using now operates properly which solved my immediate problem. I hope to get back to it before the end of the week and try to understand what's going on with another editor per your suggestion.
Thanks again
Mike