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: Nelson Flores <nflores_at_expand.cl>
Date: Mon, 8 Mar 2004 23:57:39 -0800
Message-ID: <007e01c405ac$32088730$cce8cd18@neltox>


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). (If I'm wrong please correct me - it's been a while :S) I would recommend editing it with VI (as shown below) or using AWK or Perl.
Or .. you could always apply quotes to all the lines, and then edit out the last one :P
In VI

:%s/^/\'/g
]]x

HTH
-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of manoj.gurnani_at_polaris.co.in
Sent: Sunday, March 07, 2004 11:28 PM
To: oracle-l_at_freelists.org
Subject: Unix question
Importance: High

Hi,

   I want to put a single quote before each line except last line Using sed filter .
I want this in a single expression.
How can I achieve the desired o/p.

Thanks
Manoj  



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 - 01:52:49 CST

Original text of this message

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