I am a scripting beginner.
What i am trying to do.
I have a text file that looks like this (example):
hello
hi there
apple
I am trying to make a script that saves every line as a separate new file with the line content as file name.
The name of the files should be as follows (without the .txt extension to the output files):
hello
hi there
apple
How can i use grep or awk to save every line from a text file as a new file with the line content as file name (without the .txt extension).
Thankyou for any help.