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: Satish Iyer <Satish.Iyer_at_ci.seattle.wa.us>
Date: Wed, 06 Jun 2001 12:18:55 -0700
Message-ID: <F001.0031EE36.20010606114726@fatcity.com>

<FONT
size=1>thanks guys, was making one of the most stupid mistakes, kept trying with the single quote instead of double quote after the sed . One of those End of Day Mistakes...Anyway thanks again >>> William_Rogge_at_voltek.com 06/06/01 06:30AM >>>For something as you have described, it is relatively simple:the_val=$1            #set a script variable to the passed valuecat text_file | sed "s.abc/xyz.$the_val.g" >new_filemv new_file text_fileKeep it as simple as possible.-----Original Message-----From:    Satish Iyer
[SMTP:Satish.Iyer_at_ci.seattle.wa.us]Sent:    Tuesday, June 05, 2001 8:30 PMTo:    Multiple recipients of list ORACLE-LSubject:    OT-Passing variables to a awk/sed scriptHello List,This must be piece of cake for the UNIX gurus.Trying to pass parameters to a  simple awk script. Getting stuck.First q., can we do that.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.ThanksSatish<< File: ATT00008.html >> -- Please see the official ORACLE-L FAQ: <A href="http://www.orafaq.com">http://www.orafaq.com-- Author: William Rogge  INET: William_Rogge_at_voltek.comFat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051San Diego, California        -- Public Internet access / Mailing

Lists--------------------------------------------------------------------To 
REMOVE yourself from this mailing list, send an E-Mail messageto: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and inthe message BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list you want to be removed from).  You mayalso send the HELP command for other information (like subscribing). Received on Wed Jun 06 2001 - 14:18:55 CDT

Original text of this message

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