Skip to content

Commit f02026e

Browse files
awk exercises corrections
1 parent 323f520 commit f02026e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

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

55
# TODO: Write a command to output just the names of each player in London along with the score from their last attempt.
6-
awk '$2 == "London" {print $1, $NF}' scores.txt
6+
awk '$2 == "London" {print $1, $NF}' scores-table.txt
77
# Your output should contain 3 lines, each with one word and one number on it.
88
# The first line should be "Ahmed 4".

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ set -euo pipefail
55
# NOTE: This is a stretch exercise - it is optional.
66

77
# TODO: Write a command to output the total of adding together all players' first scores.
8-
awk '{if (NF > 2) sum += $3} END {print sum}' scores.txt
8+
awk '{if (NF > 2) sum += $3} END {print sum}' scores-table.txt
99

1010
# Your output should be exactly the number 54.

0 commit comments

Comments
 (0)