grep Command in Linux: Tutorial with Examples
The grep command searches text for a pattern and prints the matching lines. Most Linux users know grep "hello" file. Fewer users know the options that make grep fast to use: recursive search, context lines, multiple patterns, and regular expressions. This tutorial shows each option with a short example and its real output.