Menu

#9 Format option ignored when reading from stdin

v1.7.0
closed-fixed
None
5
2021-09-05
2019-04-19
No

Hi,

I noticed that the format option is not respected when processing data from stdin.

Here the expected output when using -q:

$ jacksum -a "crc8" -F "#ALGONAME{i} #CHECKSUM{i}" -q txt:12345678
crc8 199

I would have expected the same output when passing data from stdin, but this is not the case:

$ echo -n "12345678" | jacksum -a "crc8" -F "#ALGONAME{i} #CHECKSUM{i}"
199 8   -

Moreover, passing multiple algorithms produce weird output.

The expected output would be the same as the -q option:

$ jacksum -a "crc8+crc32" -F "#ALGONAME{i} #CHECKSUM{i}" -q txt:12345678
crc8 c7
crc32 9ae0daaf

Instead the current behavior seems to concatenate the checksums:

$ echo -n "12345678" | jacksum -a "crc8+crc32" -F "#ALGONAME{i} #CHECKSUM{i}"
c79ae0daaf 8 -

I am using the package from Debian, I not sure if this is a problem with some modifications done by Debian or if the problem is repsoducible with the original code too.

Thanks, Antonio

P.S. Any news on 1.8.0?

Discussion

  • Johann N. Löfflmann

    • status: open --> accepted
    • assigned_to: Johann N. Löfflmann
     
  • Johann N. Löfflmann

    Thank you Antonio for the well prepared bug report. I can reproduce the issue, and I will fix it for the next release. Please stay tuned.

    Kind Regards,
    Johann

     
  • Johann N. Löfflmann

    • status: accepted --> closed-fixed
     
  • Johann N. Löfflmann

    fixed in Jacksum 3. See also https://github.com/jonelo/jacksum/releases/tag/v3.0.0

    Thanks for your patience, Antonio.

    Cheers,
    Johann

     
  • Antonio Ospite

    Antonio Ospite - 2021-09-05

    Thanks Johann, you know how they say: "good things come to those who wait".
    Ah, I just saw the release notes right after writing this :)

    Thanks again for jacksum
    Take care, Antonio

     

Log in to post a comment.