insert carriage return before string

From: T. Lists (tracylists@YAHOO.COM)
Date: Thu May 22 2003 - 15:07:00 EDT


Hi all.

Maybe I'm being a doofus, but I need some help. How
can I scriptically (ok, I made that word up) insert a
carriage return before a particular string in a file?
I don't want whole blank line before the line that
contains the string, but I want a new line character
inserted before the string itself. For example, if my
input file looks like:

      Here is line 1
      of my file
      and right here is line 4.

I want a new line character inserted before the word
"right". So, I want it to look like:

      Here is line 1
      of my file
      and
      right here is line 4.

I can't quite figure out how to do this. I get the
feeling I'm missing something pretty simple here.

Thanks for your help.

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:51 EDT