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*

14
  • Do you mean you want to see the directory name on top of the contents of each file? Can you edit the question to clarify? Maybe add example output enclosed in code brackets { } to preserve the formatting. Commented Feb 27, 2023 at 20:55
  • Hopefully I explained it better in the edit. Commented Feb 27, 2023 at 21:07
  • how are you choosing which files are concatenated, are you entering directories by hand, or are you going throug some loop and running cat command or something else on a path, if you are entering directories by hand you can use pwd command with output to file and then concatenate with >> to file to append to a file that has the path on top. If you are using some loop you can write the path you are entering to top of the file and then append with >> to the same file the concatenation Commented Feb 27, 2023 at 21:15
  • 4
    I notice that you have asked several questions but have yet to accept any of the answers you have received. Consider accepting the most helpful answers to each question. Doing so will mark the issue as resolved and increase your chances of getting help in the future. See also unix.stackexchange.com/help/someone-answers Commented Feb 27, 2023 at 21:51
  • 1
    Thanks a million! Commented Feb 27, 2023 at 23:04