I'm using Ubuntu and I need to generate multiple .txt files from a large .txt file that contains a word in each new line.
- Take one word from the large .txt list, e.g. foo
- generate .txt and name it [word].txt, e.g. foo.txt
- [word].txt should contain only the [word], e.g. foo.txt >contains foo text inside
I found that you can generate a .txt from the command line like this:
echo 'Hello, world.' >foo.txt
How to do that in batch with the content from the large .txt file?