I've heard that this is the place to ask for guidance on moving forward with a rejected edit. I have an old question that I wanted to revisit to check out the other answers that had accumulated. I liked one of the answers, but thought the rationale behind it might hard to understand for some and the code could be clearer (it took me a bit to parse out what was being done). So, I edited it but it was rejected because:
This edit deviates from the original intent of the post. Even edits that must make drastic changes should strive to preserve the goals of the post's owner.
I'm not sure how I was altering the original intent (perhaps by using variables for the patterns?); the changes seemed quite minor to me. Anyway, I'd like to understand how I can improve the answer while still staying within the bounds of an appropriate edit.
grep
,cut
andsed
, useawk
for a one pass in one context and streaming the file. For your edit, changing the variable name alone would have been ok IMO. Adding pattern for variable just cause harm in an already long line and is useless as thea
andc
comes from the question itself.awk
solutions are superior in some regards. But since my original question requested ased
approach, I don't think it's appropriate to revise the question to that nor to accept an exclusivelyawk
-based answer. Perhaps someone could ask a new question for this?