replace newline in text file
Posted: Sun May 16, 2021 8:00 am
Hi,
how do I replace all the newline characters (\n) in a text file?
how do I replace all the newline characters (\n) in a text file?
Forum of Webmaster2020.com
https://www.webmaster2020.com/forum/
Code: Select all
sed '{:q;N;s/\n/FOO/g;t q}' /path/text.txt
Code: Select all
sed '{:q;N;s/\n//g;t q}' /path/text.txt