From 3b0383d075d815d617e893521dd4987070544e96 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Thu, 7 Dec 2017 08:53:40 +0530 Subject: [PATCH] grep: remove 2 examples (#1750) * grep: remove 2 examples Make the page conform to our maximum limit of 8 examples Fixes #1695 * Address review comments --- pages/common/grep.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pages/common/grep.md b/pages/common/grep.md index 9a4ab3db64..b825c3e48b 100644 --- a/pages/common/grep.md +++ b/pages/common/grep.md @@ -23,17 +23,9 @@ `grep -{{C|B|A}} 3 {{search_string}} {{path/to/file}}` -- Print the count of matches instead of the matching text: +- Print file name with the corresponding line number for each match: -`grep -c {{search_string}} {{path/to/file}}` - -- Print line number for each match: - -`grep -n {{search_string}} {{path/to/file}}` - -- Print file names with matches: - -`grep -l {{search_string}} {{path/to/file}}` +`grep -Hn {{search_string}} {{path/to/file}}` - Use the standard input instead of a file: