Document toolboxDocument toolbox

grep command

Use the grep command to search a file for a particular pattern of characters. The command displays all lines that contain that pattern. By default, the pattern is a regular expression.

Syntax

The following is the command syntax:

grep [options] pattern [files]

The grep command is a basic Linux command. Depending on the system you are working in, the available options for this command may vary.

Example

netmrivm193> grep -i 'hello world' menu.h main.c