[Gllug] Sed and case insensitivity

Tethys tet at accucard.com
Wed Nov 13 09:25:51 UTC 2002


>Could anyone tell me if there is a way to make sed treat it's regular
>expressions as case insensitive rather than having to do stuff like
>
>/[hH][eE][lL][lL][oO]/Goodbye/s

Add a trailing /i:

	echo HeLlO | sed 's/hello/Goodbye/i'

Only works with GNU sed, though, so don't expect it to be portable.

Tet

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list