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:
- Should this question have been closed?
- 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