[accessiblelinux] the stream editor?

  • From: <aerospace1028@xxxxxxxxxxx>
  • To: <accessiblelinux@xxxxxxxxxxxxx>
  • Date: Thu, 14 Oct 2010 08:04:27 -0400

Salutations,
does anyone here have experience using sed, the command-line stream editor?  
Can sed use regular expressions in the replacement-string?  I'm wading through 
the documentation, but I'm having trouble digesting it all (it's very robust, 
which is good once you master it, but adds to the initial learning curve).

I can find lots of applications to search for regular expressions, but I still 
can't find anything to use regular expressions in the substitution field. I 
want to run through a text file and find every carriage-return (designated "$" 
IN MOST PROGRAMS) and substitute it with two carriage-returns (in openoffice, 
the only place I can do this right now, it has to be "\n\n").

Before I commit myself to learning sed, I wanted to double-check it can do what 
I want it to.

thank you:-)                                      

Other related posts: