Skip to content

Commit d83623d

Browse files
committed
Complete grep script-05: show matching lines with previous line
1 parent 1834328 commit d83623d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

individual-shell-tools/grep/script-05.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
set -euo pipefail
44

55
# TODO: Write a command to output every line in dialogue.txt that contains the string "cure", as well as the line before that line.
6+
grep -B 1 "cure" dialogue.txt
67
# The output should contain two pairs of two lines of text (with a separator between them).

0 commit comments

Comments
 (0)