From 08216c539780673bf281b2ca713b5531d7d31a71 Mon Sep 17 00:00:00 2001 From: "Mgs. M. Rizqi Fadhlurrahman" Date: Sun, 11 Oct 2020 02:46:14 +0700 Subject: [PATCH] grep: add line numbers on search (#4599) --- pages/common/grep.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/grep.md b/pages/common/grep.md index a0c7af699..53955b70a 100644 --- a/pages/common/grep.md +++ b/pages/common/grep.md @@ -11,9 +11,9 @@ `grep -F {{exact_string}} {{path/to/file}}` -- Search for a pattern recursively in the current directory, ignoring non-text files: +- Search for a pattern [R]ecursively in the current directory, showing matching line [n]umbers, [I]gnoring non-text files: -`grep -RI {{search_pattern}} .` +`grep -RIn {{search_pattern}} .` - Use extended regular expressions (supporting `?`, `+`, `{}`, `()` and `|`), in case-insensitive mode: