changeset 64508:fab6aeab9e8d

Add example of grep output with context lines.
author Juri Linkov <juri@jurta.org>
date Tue, 19 Jul 2005 14:09:52 +0000
parents 3977142624fe
children 9a66028f1658
files etc/grep.txt
diffstat 1 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/etc/grep.txt	Tue Jul 19 12:57:56 2005 +0000
+++ b/etc/grep.txt	Tue Jul 19 14:09:52 2005 +0000
@@ -29,16 +29,25 @@
 grep -nH --color=always -e "INFO tree" ../info/*
 ../info/dir:6:File: dir	Node: Top	This is the top of the INFO tree
 
+* GNU grep 2.5.1 on lines starting with a number and colon
+
+grep -nH -e "Universal Time" ../lispref/*
+../lispref/os.texi:1010:0:00 January 1, 1970 UTC (Coordinated Universal Time)
+
+* GNU grep 2.5.1 with context lines
+
+grep -C 2 -nH --color=always -e "INFO tree" ../info/*
+../info/dir-4-looking at that node, which is (dir)Top.
+../info/dir-5-
+../info/dir:6:File: dir	Node: Top	This is the top of the INFO tree
+../info/dir-7-
+../info/dir-8-The Info Directory
+
 * GNU grep 2.5.1 on files recognized as binary
 
 Binary file emacs-7 matches
 Binary file 2005-06 matches
 
-* GNU grep 2.5.1 on lines starting with a number and colon
-
-grep -nH -e "Universal Time" ../lispref/*
-../lispref/os.texi:1010:0:00 January 1, 1970 UTC (Coordinated Universal Time)
-
 * GNU grep 2.5.1: other messages
 
 grep: ../info/dirinfo: No such file or directory