coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suggestion hex offset(limit) support for head/tail binary mode


From: Pádraig Brady
Subject: Re: Suggestion hex offset(limit) support for head/tail binary mode
Date: Tue, 29 Jun 2021 00:18:10 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0

On 27/06/2021 09:57, Grigoriy Sokolik wrote:
Dear core os maintainers community!

Now I'm working a lot with binary data (gRPC traffic), and I found `tail
-c` / `head -c` / `hexdump -C` extremely useful. The only thing is that I
have to count offsets (limits) for tail/head manually each time relying on
hexdump's markers which are in hex numbers. It would be nice to support
something like, for instance, `tail -c +0x1a my_binary_dump.bin`. I even
could try to implement this feature myself, but first I want to get
approvals and advice from the community.

Similar suggestions have been made for other numeric inputs,
but the general advice is to use the standard shell syntax
to do the conversion, which is more generally applicable.
For example in this case it would be:

  tail -c +$((0x1a)) my_binary_dump.bin

cheers,
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]