Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Unix question

Re: Unix question

From: Uwe Weber <uwe.weber_at_teleos-web.de>
Date: Tue, 9 Mar 2004 20:50:16 +0100
Message-Id: <200403092050.16031.uwe.weber@teleos-web.de>


Nelson Flores schrieb:
> You cannot ...i least I think you can't ... you see, sed parses each
> line independently once and only once, looking for certain patterns
> .. this is what makes it so fast... so I believe that "the last line"
> is an unknown entity to sed pattern recognizer (pun intended)

You can give line addresses in sed like in ed or vi. Something like sed -e '$! s/.*/\'&/g' should work, though the op might have to experiment with escaping the single quote he wants to add. Putting the expresion into a sed script file worked for me.

The $ address operator finds the last line the ! negates this address, so sed will parse all the lines but the last.

Regards,
uwe



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Tue Mar 09 2004 - 13:52:59 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US