Answers for "linux add new line to text file"

1

echo new line in a file bash

echo -e "Line 1nLine 2"
Posted by: Guest on March-24-2021
-1

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
Posted by: Guest on April-02-2021

Code answers related to "linux add new line to text file"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language