-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
dd : treat arg as bytes if it contains a 'B' #6050
Conversation
GNU testsuite comparison:
|
Excellent and easier than it seems. |
@sylvestre I've added some tests could you please take a look at that |
GNU testsuite comparison:
|
Before we merge this, I'd like to try a few inputs with the GNU version. Another hypothesis based on the given inputs is that GNU parses the B from the start of the string. So |
@tertsdiepraam This is how i understood this and there is a huge chance that i might be wrong. Lets assume we have an argument called N, gnu uses an "operandxN" pattern to match the "N" where xN is the multiplicative suffix and N is recursively matched also the operand could have an optional B, it's kind of a "type annotation" saying that this operand represents bytes and if any one of these operands represent bytes then treat result as bytes. All of this essentially translates to if there is "B" in the argument then treat it as bytes. for example if we give an argument "1x2Bx4" |
I've run some tests and I agree with your interpretation. Thanks for the explanation! |
this fixes
bytes.log
test case of dd in gnu test coverage #5903.