Find the answer to your Linux question:
Results 1 to 3 of 3
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2006
    Posts
    2

    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

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    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.

  3. #3
    Just Joined!
    Join Date
    Jun 2006
    Posts
    2

    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.
    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

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •