Skip to content

Commit 18bcb76

Browse files
updates
1 parent 3aeb261 commit 18bcb76

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

individual-shell-tools/awk/script-06-stretch.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@ set -euo pipefail
66

77
# TODO: Write a command to output the total of adding together all players' first scores.
88
# Your output should be exactly the number 54.
9-
awk '{
10-
for(i=3;i<=3;i++) total += $i
11-
} END {print total}' scores-table.txt
9+
awk '{ total += $3 } END { print total }' scores-table.txt

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ 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 % ls -1t child-directory
18+
ls -1t child-directory
1919

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

0 commit comments

Comments
 (0)