Java Mailing List Archive

http://www.dba.5341.com/

Home » Home (12/2007) » oracle l »

Re: sed/Solaris case insensitive search

Ranko Mosic

2006-06-30

Replies:

You the man Dimitre.  This works !!!  Thanks very mych.
 
Regard, Ranko.

 
On 6/30/06, Radoulov, Dimitre <cichomitiko@gmail.com> wrote:
> I need to modify certain file using sed. Pattern can be both upper/lower
> case.
> Sun Solaris sed doesn't have /I switch that GNU sed has.
> Does anybody know how to perform sed insensitive search ?

$ cat text1
UNIX
uNiX
$ sed s/[Uu][Nn][Ii][Xx]/Solaris/ text1
Solaris
Solaris

$ tr "[:lower:]" "[:upper:]" < text1 | sed s/UNIX/Solaris/
Solaris
Solaris

$ sed -e s/UNIX/Solaris/ -e s/uNiX/Solaris/ text1
Solaris
Solaris


Regards
Dimitre





--
Regards,
Ranko Mosic
Contract Senior Oracle DBA
B. Eng, Oracle 10g, 9i Certified Database Professional
Phone: 416-450-2785
email: mosicr@rogers.com
http://ca.geocities.com/mosicr@rogers.com/ContractSeniorOracleDBARankoMosicMain.html
©2008 dba.5341.com - Jax Systems, LLC, U.S.A.