[Toybox] [PATCH] Add xxd -p and -r.
enh
enh at google.com
Fri Feb 19 10:00:48 PST 2016
On Fri, Feb 19, 2016 at 9:53 AM, Rob Landley <rob at landley.net> wrote:
> On Thu, Feb 18, 2016 at 11:33 PM, enh <enh at google.com> wrote:
>> SELinux denials include hex-encoded paths in the log messages; xxd -r -p is
>> a convenient way to decode them.
>>
>> The heuristics are a little weird to my mind, but match the documentation
>> and observed behavior.
>
> I'm guessing optstring shoudl have [!pcg] at the end?
well, "true" xxd just ignores -g if you supply -p. but it does look
like i got -p/-c interaction wrong: -p _does_ obey -c, it just changes
the default from 16 to 30.
>> ---
>> tests/xxd.test | 19 ++++++++++++++
>> toys/other/xxd.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
>> 2 files changed, 92 insertions(+), 7 deletions(-)
>
> Why does posix even bother having od if nobody seems to use it?
some of those who've been using unix the longest (and haven't paid
much attention to new stuff) still use od. the middle generation (to
which i belonged) seem to favor hexdump. and the most recent folks xxd
(to which i've been converted because i get sensible output without
having to add "-C", and because -- even though i don't use it all that
often -- -r is very convenient).
it might be worth suggesting to POSIX that they stop mandating od,
though, if you have the patience to deal with them...
> (Why does posix still maintain its standard documents in SCCS?
> Seriously, sccs->rcs->cvs->svn->bk->git means it's _5_ generations
> behind...)
>
> Rob
--
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.
1455904848.0
More information about the Toybox
mailing list