Text Manipulation/Replacement

Cameron Simpson cs at zip.com.au
Tue Sep 23 00:13:13 UTC 2008


On 22Sep2008 16:34, Rick Stevens <ricks at nerd.com> wrote:
> Uh, how about:
> 	cat file.txt | sed '$!N;s/\n//' >newfile.txt

For something that simple, how about:

  tr -d '\012' < file.txt >newfile.txt; echo >>newfile.txt

But I suspect he wants something more complicated (as yet unspecified).
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

The type syntax for C is essentially unparsable. - Rob Pike




More information about the fedora-list mailing list