Steps needed to convert multiple text files into one master text file
Hello all
I would like to know what process would be best to convert multiple text files into one master text file? I have complied many word list text files with in one directory see screen shot below. I would like to take the files in the assigned directory and convert them into on master word list text file. Would it be best to have a Bash or Perl script handle the process? By the way I am willing to share any of the files listed in the screen shot just reply to this post requesting what file you want. Thanks in advance Screen shot link:http://dontburnmybeans.blogspot.com/ |
A simple loop in BASH would combine some text files..
Like For I in /path/to/file/folder/*; do cat $I >> /path/to/master/file done and presto, all the files are added into one big file. Is this what you want? |
You could even get away with no loop at all:
Code:
cat /path/to/files/*.txt > /path/to/master/file |
cat them all >> all them cats
Quote:
|
You might want to pipe through 'sort -u' to strip out duplicates (if you have any) eg
cat /path/to/files/*.txt | sort -u > /path/to/master/file |
Thank you so very much for both of your solutions
|
All times are GMT -5. The time now is 08:31 AM. |