How to specify a
sed regexp address which is case-insensitive?
But I want
sed to remove lines with
my-kw in any cases.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Just use the
$ echo fooFOO | sed 's/o/a/Id' faaFaa
GNU sed 3.02 and ssed also offer the /I switch for doing a case-insensitive match. For example,
echo ONE TWO | sed "s/one/unos/I" # prints "unos TWO"