Skip to content

Commit ffe14f8

Browse files
committed
script 5 fixed
1 parent 6fc23ce commit ffe14f8

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

.DS_Store

6 KB
Binary file not shown.

jq/script-05.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ set -euo pipefail
55
# The input for this script is the scores.json file.
66
# TODO: Write a command to output the names of each player, as well as their city.
77
# Your output should contain 6 lines, each with two words on it.
8-
[{"name": "Ahmed", "city": "London", "scores": [1, 10, 4]}, {"name": "Basia", "city": "London", "scores": [22, 9, 6]}, {"name": "Mehmet", "city": "Birmingham", "scores": [3, 12, 17]}, {"name": "Leila", "city": "London", "scores": [1]}, {"name": "Piotr", "city": "Glasgow", "scores": [15, 2, 25, 11, 8]}, {"name": "Chandra", "city": "Birmingham", "scores": [12, 6]}]
8+
# [{"name": "Ahmed", "city": "London", "scores": [1, 10, 4]}, {"name": "Basia", "city": "London", "scores": [22, 9, 6]}, {"name": "Mehmet", "city": "Birmingham", "scores": [3, 12, 17]}, {"name": "Leila", "city": "London", "scores": [1]}, {"name": "Piotr", "city": "Glasgow", "scores": [15, 2, 25, 11, 8]}, {"name": "Chandra", "city": "Birmingham", "scores": [12, 6]}]
99
# jq -r '.[].name + " " + .[].city' scores.json wrong all combops
1010
jq -r '.[] | .name + " " + .city' scores.json

0 commit comments

Comments
 (0)