how to add new lines to a file in linux code example
Example: linux write each line from file to new file
for line in $(cat file.txt); do echo "${line}" > "directory/filename_${i}.txt"; i=$(( $i + 1 )); done
for line in $(cat file.txt); do echo "${line}" > "directory/filename_${i}.txt"; i=$(( $i + 1 )); done