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: Mandar Ghosalkar <MandarG_at_gsr-inc.com>
Date: Fri, 23 Mar 2001 19:03:33 -0800
Message-ID: <F001.002D6F7B.20010323190529@fatcity.com>

check
this question from korn faq at
<A

href="http://www.kornshell.com/doc/faq.html">http://www.kornshell.com/doc/faq.html
<FONT face=Arial color=#0000ff

size=2> 

Q24.	How do I do global substitutions on the 
contents of shell variables?A24.	Use // instead of / for global 
substitution, ${var//aa/bb} will	expand to the value of  with each "aa" 
replace by "bb".
so i
tried
$
var=tester$ echo $vartester$ echo ${var//e/o}bad substitution$
<FONT face=Arial color=#0000ff

size=2> 
anyone
out there :)
<FONT face=Arial color=#0000ff

size=2> 
<FONT face=Arial color=#0000ff

size=2>-Mandar
<FONT face=Arial color=#0000ff

size=2> 
<BLOCKQUOTE dir=ltr

style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">   <FONT face=Tahoma
  size=2>-----Original Message-----From: Big Planet   [mailto:bigplanet34_at_hotmail.com]Sent: Friday, March 23, 2001 7:56   PMTo: Multiple recipients of list ORACLE-LSubject: Unix   question
  Hi geeks ,
  How can I do substr and instr kind of operaion in   unix shell script . is it possible ?
  like i have one paramter as "hostname" .. I want   to trim quotes surrounding the hostname .   One more question , is possible to read another   text file line by line using a shel script and then edit that file   .
  Actually I have this configuration file for my   system which have keywords like $HOSTNAME$ , $SCHEMA$ which I want to replace   with actual values at the time of installation by asking questions to the   user.
   
  TIA
  --Big planet
   
    Received on Fri Mar 23 2001 - 21:03:33 CST

Original text of this message

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