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: OT-Passing variables to a awk/sed script

Re: OT-Passing variables to a awk/sed script

From: <sfaroult_at_oriole.com>
Date: Wed, 06 Jun 2001 01:15:13 -0700
Message-ID: <F001.0031D7AD.20010606004042@fatcity.com>

>Hello List,
>
>This must be piece of cake for the UNIX gurus.
>
>Trying to pass parameters to a simple awk script. Getting stuck.=20
>First q., can we do that.=20
>If yes I need to solve the foll. problem,
>
>In a huge text file locate for "abc/xyz" and replace it with a supplied =
>parameter value. This paramter must of course, be able to take on any =
>value during the run of the program.
> Any help or tips on that would be highy appreciated.
>
>Thanks
>
>Satish
>

Satish,

   It depends on the system you are on. The old original awk does not allow parameters to be passed to it, but the newest can take

   -v parameter_name=value
On many systems, the new awk is called 'nawk', but not everywhere.

   Try 'man awk/man nawk' on your system and check which one takes the -v flag.

HTH Stephane Faroult
Oriole Corporation

--
Diese E-Mail wurde mit http://de.mail-inspector.de verschickt
Mail Inspector ist ein kostenloser Service von http://www.is-fun.net

Der Absender dieser E-Mail hatte die IP: 195.25.229.12

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

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (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).
Received on Wed Jun 06 2001 - 03:15:13 CDT

Original text of this message

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