Join Lines of Text File Together

This page answers questions like these:


Related Links:
Count Occurrences of a Hexadecimal Sequence in a File
Count Occurrences of a String in a File
Find Positions of a Hexadecimal Sequence in a File
Output Lines of a File in Reverse Order
Output the Lines Between Two Matching Lines
Sed Cannot Rename Temporary File Permission Denied



Join Lines of Text File Together without a Separator:

tr -d '\n\r' < FILE1 > FILE2

Join Lines of Text File Together with a Separator:

sed -i ':a;N;s/\n/SEPARATOR/;ba' FILE



Related Links:
Count Occurrences of a Hexadecimal Sequence in a File
Count Occurrences of a String in a File
Find Positions of a Hexadecimal Sequence in a File
Output Lines of a File in Reverse Order
Output the Lines Between Two Matching Lines
Sed Cannot Rename Temporary File Permission Denied

Home  >  Linux / Unix  >  Join Lines of Text File Together


Tags: join lines, join, lines, text file, text, shell command, shell, command, linux, unix, solaris, bsd, aix

Copyright © HelpDoco.com
file-join-lines.txt
Linux-Unix/join-lines-of-a-text-file-together.htm
2