Skip to content

Commit 11f5329

Browse files
committed
updated exercises
1 parent 3743735 commit 11f5329

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ set -euo pipefail
44

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.
7-
grep ^Doctor: ./*.txt
7+
grep -l ^Doctor: ./*.txt

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ set -euo pipefail
44

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.
7-
grep -c ^Doctor: ./*.txt
7+
grep -c ^Doctor: *.txt

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ echo "First exercise (sorted newest to oldest):"
1515

1616
# TODO: Write a command which lists the files in the child-directory directory, one per line, sorted so that the most recently modified file is first.
1717
# The output should be a list of names in this order, one per line: helper-3.txt, helper-1.txt, helper-2.txt.
18-
ls -1t
18+
ls -1t child-directory
1919

2020
echo "Second exercise (sorted oldest to newest):"
2121

2222
# TODO: Write a command which does the same as above, but sorted in the opposite order (oldest first).
2323
# The output should be a list of names in this order, one per line: helper-2.txt, helper-1.txt, helper-3.txt.
24-
ls -1tr
24+
ls -1tr child-directory

0 commit comments

Comments
 (0)