Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Thanks for your answer.. +1 .. I don't know if accept my answer because yours is not unix-linux specific and my answer is a bit faster, as far as I tested it.. what do you think? Commented Feb 12, 2014 at 13:12
  • You welcome, there are of course other solutions with more unix specific tools. But this seems a good use of Python's in operator. Commented Feb 12, 2014 at 13:21
  • There is python command line wrapper to make it more unix like, with piping built in, named pyp: code.google.com/p/pyp I think it is trivial to make this solution more unix like one liner tool. Commented Nov 14, 2014 at 9:15