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
  • 2
    The combination of grep and sed is rather unnecessary, as sed can do both steps in one: sed -nr 's/^(pro|con)(.*)/\2/p' | sort | uniq -d Commented Jul 28, 2015 at 22:04
  • I'll update to reflect this - thanks for the tip! Keep in mind that it only works in GNU sed, and not BSD sed. Commented Jul 28, 2015 at 23:26
  • 2
    replace -r with -E and it will work with both seds ... also, Peter meant you can drop egrep and use just sed Commented Jul 28, 2015 at 23:32