Skip to content

Commit 94e8f3f

Browse files
committed
Add the correct path for grep exercises.
1 parent 81d75b8 commit 94e8f3f

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set -euo pipefail
55
# TODO: Write a command to output the number of lines in dialogue.txt that contain the word Doctor (regardless of case).
66
# The output should be exactly the number 9.
77

8-
grep -i individual-shell-tools/grep/"Doctor" dialogue.txt | wc -l
8+
grep -i "Doctor" individual-shell-tools/grep/dialogue.txt | wc -l

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set -euo pipefail
55
# TODO: Write a command to output every line in dialogue.txt that does not contain the word "Hello" (regardless of case).
66
# The output should contain 10 lines.
77

8-
grep -iv individual-shell-tools/grep/"Hello" dialogue.txt
8+
grep -iv "Hello" individual-shell-tools/grep/dialogue.txt

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set -euo pipefail
55
# TODO: Write a command to output the name of every `.txt` file in this directory which contains a line of dialogue said by the Doctor.
66
# The output should contain two filenames.
77

8-
grep -l individual-shell-tools/grep/"Doctor" *.txt
8+
grep -l "Doctor" individual-shell-tools/grep/*.txt

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set -euo pipefail
55
# TODO: Write a command to output, for each `.txt` file in this directory, how many lines of dialogue the Doctor has.
66
# The output should show that dialogue.txt contains 6 lines, dialogue-2.txt contains 2, and dialogue-3.txt contains 0.
77

8-
grep -c individual-shell-tools/grep/"Doctor" *.txt
8+
grep -c "^Doctor:" individual-shell-tools/grep/*.txt

0 commit comments

Comments
 (0)