Skip to content

Commit 6eefb24

Browse files
committed
Remove -r flag to match json format
1 parent 7614a6e commit 6eefb24

10 files changed

Lines changed: 10 additions & 10 deletions

File tree

jq/script-01.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ set -euo pipefail
66
# TODO: Write a command to output the name of the person.
77
# Your output should be exactly the string "Selma", but should not contain any quote characters.
88

9-
jq -r .name person.json
9+
jq .name person.json

jq/script-02.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ set -euo pipefail
66
# TODO: Write a command to output the address of the person, all on one line, with a comma between each line.
77
# Your output should be exactly the string "35 Fashion Street, London, E1 6PX", but should not contain any quote characters.
88

9-
jq -r '.address | join(", ")' person.json
9+
jq '.address | join(", ")' person.json

jq/script-03.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ set -euo pipefail
66
# TODO: Write a command to output the name of the person, then a comma, then their profession.
77
# Your output should be exactly the string "Selma, Software Engineer", but should not contain any quote characters.
88

9-
jq -r '[.name, .profession] | join (", ")' person.json
9+
jq '[.name, .profession] | join (", ")' person.json

jq/script-04.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ set -euo pipefail
77
# Your output should contain 6 lines, each with just one word on it.
88
# Your output should not contain any quote characters.
99

10-
jq -r '.[].name' scores.json
10+
jq '.[].name' scores.json

jq/script-05.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ set -euo pipefail
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.
88

9-
jq -r '.[] | [.name, .city] | join(" ")' scores.json
9+
jq '.[] | [.name, .city] | join(" ")' scores.json

jq/script-06.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ set -euo pipefail
77
# Your output should contain 6 lines, each with one word and one number on it.
88
# The first line should be "Ahmed 1" with no quotes.
99

10-
jq -r '.[] | [.name, .scores[0]] | join(" ")' scores.json
10+
jq '.[] | [.name, .scores[0]] | join(" ")' scores.json

jq/script-07.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ set -euo pipefail
77
# Your output should contain 6 lines, each with one word and one number on it.
88
# The first line should be "Ahmed 4" with no quotes.
99

10-
jq -r '.[] | [.name, .scores[-1]] | join(" ")' scores.json
10+
jq '.[] | [.name, .scores[-1]] | join(" ")' scores.json

jq/script-08.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ set -euo pipefail
77
# Your output should contain 6 lines, each with one word and one number on it.
88
# The first line should be "Ahmed 3" with no quotes.
99

10-
jq -r '.[] | "\(.name) \(.scores | length)"' scores.json
10+
jq '.[] | "\(.name) \(.scores | length)"' scores.json

jq/script-09.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ set -euo pipefail
77
# Your output should contain 6 lines, each with one word and one number on it.
88
# The first line should be "Ahmed 15" with no quotes.
99

10-
jq -r '.[] | "\(.name) \(.scores | add)"' scores.json
10+
jq '.[] | "\(.name) \(.scores | add)"' scores.json

jq/script-11.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ set -euo pipefail
66
# TODO: Write a command to output the total of adding together all scores from all games from all players.
77
# Your output should be exactly the number 164.
88

9-
jq -r '[.[].scores | add] | add' scores.json
9+
jq '[.[].scores | add] | add' scores.json

0 commit comments

Comments
 (0)