From chuck_hamilton@yahoo.com Mon, 26 Mar 2001 06:20:35 -0800 From: Chuck Hamilton Date: Mon, 26 Mar 2001 06:20:35 -0800 Subject: RE: Unix question Message-ID: MIME-Version: 1.0 Content-Type: text/plain For single character replacement (or removal) use "tr". For string to string replacement use sed. echo $var | tr "e" "o" -or- echo $var | sed "s/e/o/g" # (the '/g' means globally)   Mandar Ghosalkar wrote: check this question from korn faq at http://www.kornshell.com/doc/faq.html   Q24. How do I do global substitutions on the contents of shell variables?A24. Use // instead of / for global substitution, ${var//aa/bb} willexpand to the value of  with each "aa" replace by "bb". so i tried $ var=tester$ echo $vartester$ echo ${var//e/o}bad substitution$   anyone out there :)   -Mandar   -----Original Message-----From: Big Planet [mailto:bigplanet34@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    Do You Yahoo!? Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.