Re: [Toybox] Numeric values in dd operands

2018-02-20 Thread scsijon
fyi, Both quaternary (base4) and octal (base8) are used by analog device inputs even today. There's a lot of security systems out there! And you can even get them storing and using the data stacked in the rom, where octal can appear as hexidecimal but are really upper and lower octal pairs,

Re: [Toybox] RFC: "ps -o ?", "logger -p ?", "kill -s ?"

2018-02-20 Thread Robert Thompson
It's nice where the "what do I put here?" and the "that particular argument isn't supported in this version" logic cases can be folded together. Just list valid choices for that argument, then terminates unsuccessfully (non-zero error code, but without the normal "I didn't understand you" error

Re: [Toybox] Numeric values in dd operands

2018-02-20 Thread Robert Thompson
I've seen a fair number of scripts that use printf's ability to interpret hex and octal arguments. This is often combined with printf's ability to format outputs into decimal, octal, or hex, to make a convenient base-shifter. For this discussion, it's the argument conversion, not the formatting

Re: [Toybox] RFC: "ps -o ?", "logger -p ?", "kill -s ?"

2018-02-20 Thread enh
wasn't that the whole reason behind adding the suggestion to the syntax error message? ps: Missing argument to -o (see "ps --help") i think the only real problem is the old bug where commands like top don't show the -o/-O help from ps. (a quick workaround would be to mention the "see also" in

Re: [Toybox] RFC: "ps -o ?", "logger -p ?", "kill -s ?"

2018-02-20 Thread Rob Landley
On 02/20/2018 12:15 PM, Rob Landley wrote: > A lot of commands take a list of possible inputs to one of their options, and > there should be a way to query "what are the inputs". The way qemu does it is > to > let you supply ? as the input (ala "qemu-system-i386 -M ?") > > The problem is ? is

Re: [Toybox] Numeric values in dd operands

2018-02-20 Thread enh
On Tue, Feb 20, 2018 at 9:57 AM, Rob Landley wrote: > On 02/20/2018 11:32 AM, enh wrote: >> On Tue, Feb 20, 2018 at 9:28 AM, Rob Landley wrote: >>> A real user piped up and said their existing script doesn't work with my >>> tool. >>> That feedback is of

[Toybox] RFC: "ps -o ?", "logger -p ?", "kill -s ?"

2018-02-20 Thread Rob Landley
A lot of commands take a list of possible inputs to one of their options, and there should be a way to query "what are the inputs". The way qemu does it is to let you supply ? as the input (ala "qemu-system-i386 -M ?") The problem is ? is a shell wildcard so you have to quote it. Otherwise it

Re: [Toybox] Numeric values in dd operands

2018-02-20 Thread Rob Landley
On 02/20/2018 11:32 AM, enh wrote: > On Tue, Feb 20, 2018 at 9:28 AM, Rob Landley wrote: >> A real user piped up and said their existing script doesn't work with my >> tool. >> That feedback is of interest to me. > > and as the person who set us down the strtol path >

Re: [Toybox] Numeric values in dd operands

2018-02-20 Thread enh
On Tue, Feb 20, 2018 at 9:28 AM, Rob Landley wrote: > On 02/19/2018 09:09 PM, scsijon wrote: >> On 02/20/2018 08:32 AM, toybox-requ...@lists.landley.net wrote: >>> Are you actually using that mid-number multiplier? I was asking on the list >>> last >>> year if anyone anywhere

Re: [Toybox] Numeric values in dd operands

2018-02-20 Thread Rob Landley
On 02/19/2018 09:09 PM, scsijon wrote: > On 02/20/2018 08:32 AM, toybox-requ...@lists.landley.net wrote: >> Are you actually using that mid-number multiplier? I was asking on the list >> last >> year if anyone anywhere actually did that. (It's a relic from before the >> shell >> provided