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.

5
  • Nice! I mostly use POSIX features only, so I wasn't aware of the --complement option. Notably, this is GNU-specific. Commented Apr 1, 2017 at 1:04
  • I was looking at a more specific option, because its in text file and "test5232.lop" isn't always in the same place. Commented Apr 1, 2017 at 1:10
  • @JohnDoe6262, that's actually a much less interesting use case. Commented Apr 1, 2017 at 1:13
  • @JohnDoe6262, maybe @wildcard will modify his sed answer, because if just want to remove a specific string sed is super easy. Commented Apr 1, 2017 at 1:14
  • 1
    If your cut doesn't support --complement you can use a field list instead: cut -d '|' -f 1-2,4- Commented Apr 1, 2017 at 12:48