As the code on this post is really compact and hard to read, I made an edit to improve it. However, the author rejected it because this "deviates from the original intent of the post". I do not agree, I did not changed the meaning or behavior of this code.

  • 1
    Is there a question here? Dec 3 '17 at 3:10

Based on the diff in the suggestion, you did change random things: n=0 became n=1, an ((n++)) went missing, as did a skip=0 argument, possibly other things. Changing code in a question is risky because it could inadvertently confuse others trying to post an answer or the asker trying to understand answers based on the modified code. The asker wants to see answers based on exactly what they were doing, not based on the new version someone else came up with.

  • Thanks for your answer. The argument skip=0 for dd just do nothing, it is the default, so i simplified. The initial value of n is now clear, it was set to 0 and incremented before first use. I merged the two ((n++)) to only one, and moved it at the bottom of the loop, this is the canonical form. Values of variables are strictly preserved for all commands.
    – user285259
    Dec 3 '17 at 11:36
  • 6
    @user285259 even if your changes are correct, they should not have been made on a question. Edits improving code are fine on answers, but not on questions since you might be removing the very error that was causing the problem in the first place. Instead, next time post an answer correcting the code and pointing out whatever errors you might have found.
    – terdon Mod
    Dec 3 '17 at 13:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .