How to Use the Grep Utility

Use the Grep utility to perform a regular expression search for text patterns through text files.

To Access Grep from the Dashboard

To run Grep from the Support Tools Dashboard:

1.Use the System Select screen to select the system you want to work with.

2.From the Dashboard menu, select Common Tools > Grep.

3.In the Arguments field, enter desired arguments, as described in the Using section below.

Note: When entering arguments, the Grep command is already implied. Do not enter it in the Arguments field.

4.Specify the command duration time or accept the default (60 seconds). This is the amount of time the command will attempt to run before terminating.

5.If desired, check Elevate Command Priority. This ensures the command will run regardless of the level of server activity.

6.Click the Run button.

Using Grep

Syntax

grep [ -mvclinfse? ] <pattern> file1 ...

Command Line Options

The options for Grep are:

-m:print the lines that match the pattern (DEFAULT).

-v:print the lines that DON'T match the pattern.

-c:print a count of the number of matching lines in each file.

Cisco Support Tools 1.0 User Guide

How to Use the Grep Utility 228

Page 228
Image 228
Cisco Systems 1.0 (1) manual How to Use the Grep Utility, To Access Grep from the Dashboard, Using Grep