OK.  You got me going on this for a solution when GNU sed is not available.
(See what you did.)
Instead of the ksh example, here's a non-GNU sed one that works.  It works
on GNU sed too.

sed '
   $!N
   s/\(^.*\n.*:\)\(this\)\(.*$\)/\1that\3/
   p
   d
'

Here's an awk that is essentially the equivalent of the ksh thing.

awk -F':| ' '
   BEGIN{ x = 1 }
   (x = 0||(x-1)) == 1 {$2 = "that"}
   {print $1":"$2,$3,$4,$5,$6,$7,$8,$9}
'
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: <[EMAIL PROTECTED]
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to