Tag Archives: grep

Strange bracketing behavior in grep and sed

I finally figured out this thorny issue I have been dealing with for the last hour. In perl, if I can create a character class like “[\[\]a-f]” which matches any characters a-f, [, and ]. This does not work in grep or sed though. I finally discovered that the right bracket “]” should not be […]

Posted in linux | Tagged , , | Comments Off on Strange bracketing behavior in grep and sed