grep ( -c option )

UNIX Command

$grep -c pack  resume.txt
0
$grep -c Linux  resume.txt
9
$grep -c Lin  resume.txt
9
$grep -c Li  resume.txt
9
$grep -c L  resume.txt
15
$grep -c engineer  resume.txt
2
$grep -c 1976  resume.txt
1
$grep -c GNU  resume.txt
5
$

UNIX Explanation For (grep -c)

Suppress normal output; instead print a count of matching lines for
each input  file.  With the -v, --invert-match  option (see below),
count non-matching lines.  (-c is specified by POSIX.)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s