Why grep 2.7 complains of incorrect character in /etc/profile.d/lang.csh in Red Hat Enteprise Linux?

Solution Verified - Updated -

Issue

  • The character class used in the grep command on line 6 of  /etc/profile.d/lang.csh is [:blank:], the correct representation should  be either [[:blank:]] or [[:space:]].  With version 2.7 of GNU grep, the following warning is issued:
    grep: character class syntax is [[:space:]], not [:space:]
    
  • This problem does not occur with the version of grep included in Red Hat Enterprise Linux 4 and 5.

Environment

  • Red Hat Enterprise Linux 4 or 5
  • grep-2.7 (compiled by customer)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content