write line to text file linuc 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