1

This question is being presented as an audit.

The OP:

  • Gives the code being used, and
  • The inputs used, and
  • The actual output, and
  • The desired output.

Despite this it has been closed as unclear and it is being presented as audit to check that reviewers understand that it should be closed.

I am not convinced it should have been closed but I can accept the judgement call of others wiser than I.

I do think it is not a good question to use in an audit. It is not obviously a bad question. The OP has ticked all the boxes and if they are a bit light on for chatter then I think that's potentially to be encouraged.

Questions:

  1. Should this question have been closed?
  2. If yes, should it be used as a audit check to require reviewers to vote to close the question?

https://stackoverflow.com/review/close/18447325

I would like to use SED in order to filter a file and only get the id which is constituted of 3 numbers and the Domain (e.g.: google.com).

Original File:

451 [04/Jan/1997:03:35:55 +0100] http://www.netvibes.com
448 [04/Jan/1997:03:36:30 +0100] www.google.com:443
450 [04/Jan/1997:03:36:48 +0100] http://84.55.151.142:8080
452 [04/Jan/1997:03:36:51 +0100] http://127.0.0.1:9010
451 [04/Jan/1997:03:36:55 +0100] http://www.netvibes.com
453 [04/Jan/1997:03:37:10 +0100] api.del.icio.us:443
453 [04/Jan/1997:03:37:33 +0100] api.del.icio.us:443
448 [04/Jan/1997:03:37:34 +0100] www.google.com:443

Used SED commands : sed -e 's/[[^]]]//g' -e 's/http:////g' -e 's/www.//g' -e 's/^.com//g' -e 's/:[0-9]//g'

Current Output:

451  netvibes.com
448  google.com
450  84.55.151.142
452  127.0.0.1
451  netvibes.com
453  api.del.icio.us
453  api.del.icio.us
448  google.com

Wished Output:

451 netvibes.com
448 google.com
451 netvibes.com
448 google.com
2
  • 1
    Just to note: it's not that a question can be ticked as "don't use for audits", the only way it can be taken out of rotation is by removing the automated selection criteria - I.E. in this case it would have to be reopened (assuming the selection criteria is the fact that it is closed). So when the answer to 1) is "yes" then the answer to 2) doesn't really matter anymore, it is going to be possibly used as an audit as it is going to stay closed.
    – Gimby
    Jan 8, 2018 at 12:18
  • @Gimby - Thanks for the insight
    – jwpfox
    Jan 8, 2018 at 19:21

1 Answer 1

7

Regarding the closure:

The case can be made that the user didn't clearly spell out their requirements, and that their desired output seems to contradict their initial statement.

What is the user trying to filter out? The lines with IP addresses and not domain names? Then why api.del.icio.us has been excluded from their desired output? Is it an error on the desired output fragment, or an error on the definition of the problem?

As it is, without further edits, I think that the case of the question being unclear stands.

It could be that the question could have been made clear with a bit of back-and-forth in comments, and as I see a few users went ahead and answered assuming what the actual requirements were (and one actually got their answer accepted...) but that doesn't make the question on itself any more clear, IMO.

With very little work the question could be edited to be good question (although duplicates probably exists). But that work hasn't been done yet (and since the question has been answered, it probably wont ever be done by the OP); so the closure seems fine to me.

In regards as it being used as an audit...

Audits are supposedly there to make sure we are paying enough attention. This one is slightly harder than average, but I do not think it the result is ambiguous; and being forced to stop and think a bit longer can serve as a reminder that going a bit slower (or skipping) can sometimes be a better strategy.

You must log in to answer this question.

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