From 15e288584240298b94b15be45cee55b41c052043 Mon Sep 17 00:00:00 2001 From: Randy8080 Date: Sat, 2 Jan 2021 12:02:32 +0800 Subject: [PATCH] Added shell highlighting --- grep.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/grep.md b/grep.md index 64a8be5..c6bb93d 100644 --- a/grep.md +++ b/grep.md @@ -15,18 +15,18 @@ Getting started {.cols-5} ### Usage {.col-span-2} Search standard output (i.e. a stream of text) -``` -grep [options] search_string +```shell script +$ grep [options] search_string ``` Search for an exact string in file: -``` -grep [options] search_string path/to/file +```shell script +$ grep [options] search_string path/to/file ``` -Print every line in myfile.txt containing the string 'mellon' -``` -grep 'mellon' myfile.txt +Print lines in myfile.txt containing the string "mellon" +```shell script +$ grep 'mellon' myfile.txt ``` Wildcards are accepted in filename.