Chapter 5. Command Line Tools

download PDF
This section describes the behavioral changes of command-line tools in Red Hat Enterprise Linux 6.

5.1. Grep

The behavior of the grep command has changed with regards to searching for upper and lower case strings. Using interval searching in the [a-z] format is dependent on the LC_COLLATE variable.
You can set LC_COLLATE=C to preserve old behavior and to achieve proper results when performing interval searching with this method; however, in Red Hat Enterprise Linux 6, the recommended way of interval searching is to use the [[:lower:]],[[:upper:]] format.
This change can significantly affect output, so scripts and processes must be reviewed to continue to achieve the correct results.
Red Hat logoGithubRedditYoutubeTwitter


Try, buy, & sell


About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.