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.

2
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. Commented Apr 4, 2023 at 5:43
  • 1
    Consider explaining what your command does. Note that your grep command would remove all paths that contain /wrong/dir/path (i.e. it would remove /usr/sbin if you use grep -v '/sbin'). Also, it would be shorter to use paste -d : -s - than that last tr and sed. Commented Apr 4, 2023 at 6:17