]> git.eshelyaron.com Git - emacs.git/commitdiff
Add example of grep output with context lines.
authorJuri Linkov <juri@jurta.org>
Tue, 19 Jul 2005 14:09:52 +0000 (14:09 +0000)
committerJuri Linkov <juri@jurta.org>
Tue, 19 Jul 2005 14:09:52 +0000 (14:09 +0000)
etc/grep.txt

index 68d2f0c03fa1d0e646ec1851538bfe4138db162a..4149f80b2033a5149f56fc60e8a55a4ab7af786f 100644 (file)
@@ -29,16 +29,25 @@ GREP_COLORS='mt=01;31:fn=:ln=:bn=:se=:ml=:cx=:ne' grep -nH --color=always -e "IN
 grep -nH --color=always -e "INFO tree" ../info/*
 \e[35m\e[K../info/dir\e[m\e[K\e[36m\e[K:\e[m\e[K\e[32m\e[K6\e[m\e[K\e[36m\e[K:\e[m\e[KFile: dir        Node: Top       This is the top of the \e[01;31m\e[KINFO tree\e[m\e[K
 
-* 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 \e[01;31mUniversal Time\e[00m)
 
+* 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-\1f
+../info/dir:6:File: dir        Node: Top       This is the top of the \e[01;31mINFO tree\e[00m
+../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: other messages
 
 grep: ../info/dirinfo: No such file or directory