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*

5
  • Yes I want all the files in BarX, but no X will go from 1 to a large number. Commented Dec 10, 2018 at 21:29
  • Does order need to be preserved between each run? Eg should Bar1/File2 always appear in the concatenated output before Bar2/File1? This will affect whether it can be accomplished using a simple one-liner, or whether a more complicated (perhaps recursive) result will be required. Commented Dec 10, 2018 at 21:32
  • Unfortunately yes. The files are ordered so the concatenation needs to be ordered. Commented Dec 10, 2018 at 21:34
  • This is similar to a question asked a few months ago, but the answers didn't seem to work for me, or maybe I don't interpret them correctly Commented Dec 10, 2018 at 21:49
  • Okay, actually the answers here were very close to what I need. Can the code be expanded to larger sets of directories? unix.stackexchange.com/questions/465364/… Commented Dec 10, 2018 at 21:57