Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: sed/Solaris case insensitive search
> 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
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Jun 30 2006 - 13:50:14 CDT
![]() |
![]() |