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*

2
  • "More best", change the way the list of file names was captured in the first place, so that either no splitting is required or that an otherwise unused character separates the items Commented Oct 22, 2021 at 7:39
  • Nice answer. Here's a slight variation of your best solution using perl to make the output NUL delimited (in case the filenames contain quote characters): perl -pe 's/\s+([.]{0,2}\/)/\0\1/g' test2.txt Commented Oct 22, 2021 at 8:09