Hi guys,
I hope you are well and can help.
I have many text files, all with the same format, that contain, as part of their file names, "summary_sorted.txt".
For example, summary_sorted_a_.txt, summary_sorted_b.txt, summary_sorted_c.txt etc etc.
The format of each of these files is as follows:
--------------------------------------------------------------------------------------------------- summary_sorted_a.txt
abalone, adversary, aeroplane, at the park;
--------------------------------------------------------------------------------------------------- summary_sorted_b.txt
bat, benign, bipartisan;
I'd like to produce a script that will....
Examine each summary_sorted.txt file.
For each file examined, treat each file examined as 1 line, and copy its entire contents to a new file called master.txt. and
then add a blank line after its pasted contents, before the script goes on to look at the next summary_sorted.txt file.
As an example of what a master.txt file would look like based on the above, would be:
--------------------------------------------------------------------------------------------------- master.txt
abalone, adversary, aeroplane, at the park;
bat, benign, bipartisan;
Any help greatly appreciated.