I have file with different text on each line like:
blue
red
black
blue and red
red and black
How to create file for each line of text and the file names to be the same as the text? And also to add extension to the files? The files should look like this:
blue.txt
red.txt
black.txt
blue and red.txt
red and black.txt
Edit: i made a mistake because i have also some lines of text that contain multiple words with space between them. sorry.