Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sed/awk quicky

Status
Not open for further replies.

ranjit

Technical User
Apr 14, 2000
131
GB
Is there a quick sed/awk approach to remove the new line character in a file replacing it with a space?

Example input file:
a
b
c

Desired results:
a b c

The tr commands appear to work with:
tr "\012" " " <input_file.txt

 
nawk -v ORS=" " '1' myFile.txt

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top