newline removal with sed

Sed scripting forum.

newline removal with sed

Postby james on January 24th, 2008, 3:14 pm

This will remove the newlines from a file using sed:
Code: Select all
sed '{:s;N;s/\n//g;t s}' t1.txt

where t1.txt is the file we wish to remove the newlines from.
james
Member
 
Posts: 18
Joined: January 18th, 2008, 2:27 pm

Return to Sed

Who is online

Users browsing this forum: No registered users and 0 guests

cron

dsplabs homelinux bloglinux forums new!travel photography
©2010 dsplabs.com.au