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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.