From bf55fb1332b461f81c3b11f93b08d100aacf14ea Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 00:41:29 +0200 Subject: [PATCH 01/12] Add jq command to output the name from person.json --- jq/script-01.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jq/script-01.sh b/jq/script-01.sh index 95827f688..41d71a2d4 100755 --- a/jq/script-01.sh +++ b/jq/script-01.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail - +jq -r '.name' person.json # The input for this script is the person.json file. # TODO: Write a command to output the name of the person. # Your output should be exactly the string "Selma", but should not contain any quote characters. From 7b28936a235d4d525a4da7b6d95c131ddab88abf Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 00:43:22 +0200 Subject: [PATCH 02/12] Add jq command to output the address from person.json --- jq/script-02.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/jq/script-02.sh b/jq/script-02.sh index 21544d67b..7ab4de043 100755 --- a/jq/script-02.sh +++ b/jq/script-02.sh @@ -1,6 +1,7 @@ #!/bin/bash set -euo pipefail +jq -r '.address | join(", ")' person.json # The input for this script is the person.json file. # TODO: Write a command to output the address of the person, all on one line, with a comma between each line. From 4d78ec715863cb95ae9d308ce4a25ee0b19fe639 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 00:45:16 +0200 Subject: [PATCH 03/12] Add jq command to output name and profession from person.json --- jq/script-03.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/jq/script-03.sh b/jq/script-03.sh index 3566f03ba..1a3e4c451 100755 --- a/jq/script-03.sh +++ b/jq/script-03.sh @@ -1,6 +1,7 @@ #!/bin/bash set -euo pipefail +jq -r '.name + ", " + .profession' person.json # The input for this script is the person.json file. # TODO: Write a command to output the name of the person, then a comma, then their profession. From 188f1f2500a2aafd5eee2bcaef6b511b7bc9d463 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 00:47:23 +0200 Subject: [PATCH 04/12] Add jq command to output player names from scores.json --- jq/script-04.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/jq/script-04.sh b/jq/script-04.sh index 015997e18..701809bd4 100755 --- a/jq/script-04.sh +++ b/jq/script-04.sh @@ -1,6 +1,7 @@ #!/bin/bash set -euo pipefail +jq -r '.[].name' scores.json # The input for this script is the scores.json file. # TODO: Write a command to output just the names of each player, one per line. From 78ff0170d76ebd6d01b6db1f3ed9b9746ef5a454 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 00:49:35 +0200 Subject: [PATCH 05/12] Add jq command to output player names and cities from scores.json --- jq/script-05.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jq/script-05.sh b/jq/script-05.sh index 993fc9ee3..763132a25 100755 --- a/jq/script-05.sh +++ b/jq/script-05.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail - +jq -r '.[] | "\(.name) \(.city)"' scores.json # The input for this script is the scores.json file. # TODO: Write a command to output the names of each player, as well as their city. # Your output should contain 6 lines, each with two words on it. From f93d662b3a36e5b4a6ef687146d4b6727b03d022 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 00:51:22 +0200 Subject: [PATCH 06/12] Add jq command to output player names and their first scores from scores.json --- jq/script-06.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jq/script-06.sh b/jq/script-06.sh index 8b6e74c52..7d52d8c09 100755 --- a/jq/script-06.sh +++ b/jq/script-06.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail - +jq -r '.[] | "\(.name) \(.scores[0])"' scores.json # The input for this script is the scores.json file. # TODO: Write a command to output just the names of each player along with the score from their first attempt. # Your output should contain 6 lines, each with one word and one number on it. From 80b75fb8c60d5d0bd696958b3c5832c550ea215b Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 00:52:52 +0200 Subject: [PATCH 07/12] Add jq command to output player names and their last scores from scores.json --- jq/script-07.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jq/script-07.sh b/jq/script-07.sh index d43f93d1b..10346fee3 100755 --- a/jq/script-07.sh +++ b/jq/script-07.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail - +jq -r '.[] | "\(.name) \(.scores[-1])"' scores.json # The input for this script is the scores.json file. # TODO: Write a command to output just the names of each player along with the score from their last attempt. # Your output should contain 6 lines, each with one word and one number on it. From 580b5cce9ebc662fd9ef45f641eddbbde86cf6c4 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 00:53:54 +0200 Subject: [PATCH 08/12] Add jq command to output player names and their scores count from scores.json --- jq/script-08.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jq/script-08.sh b/jq/script-08.sh index 6671fd1ba..426c96a5f 100755 --- a/jq/script-08.sh +++ b/jq/script-08.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail - +jq -r '.[] | "\(.name) \(.scores | length)"' scores.json # The input for this script is the scores.json file. # TODO: Write a command to output just the names of each player along with the number of times they've played the game. # Your output should contain 6 lines, each with one word and one number on it. From 6ea3828f353dadb60adbf1432288c6d48a7d6498 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 00:54:42 +0200 Subject: [PATCH 09/12] Add jq command to output player names and their total scores from scores.json --- jq/script-09.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jq/script-09.sh b/jq/script-09.sh index c2536a536..173118d5a 100755 --- a/jq/script-09.sh +++ b/jq/script-09.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail - +jq -r '.[] | "\(.name) \(.scores | add)"' scores.json # The input for this script is the scores.json file. # TODO: Write a command to output just the names of each player along with the total scores from all of their games added together. # Your output should contain 6 lines, each with one word and one number on it. From 2c4a9ab155a52c8fa4ea04ea71f55bb34c090f31 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 00:56:50 +0200 Subject: [PATCH 10/12] Add jq command to output the total of all players' first scores from scores.json --- jq/script-10.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jq/script-10.sh b/jq/script-10.sh index 8e9d75f07..594e3de8b 100755 --- a/jq/script-10.sh +++ b/jq/script-10.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail - +jq -r '[.[].scores[0]] | add' scores.json # The input for this script is the scores.json file. # TODO: Write a command to output the total of adding together all players' first scores. # Your output should be exactly the number 54. From b75af2e58e7fe8cda49aec9a324bd5da356127d8 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 00:57:42 +0200 Subject: [PATCH 11/12] Add jq command to output the total of all scores from all players in scores.json --- jq/script-11.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jq/script-11.sh b/jq/script-11.sh index d2337a6b2..b074450dc 100755 --- a/jq/script-11.sh +++ b/jq/script-11.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail - +jq -r '[.[].scores[]] | add' scores.json # The input for this script is the scores.json file. # TODO: Write a command to output the total of adding together all scores from all games from all players. # Your output should be exactly the number 164. From e81f76f3e5c991ce9c3107e1b1c8a03dbd09fe6f Mon Sep 17 00:00:00 2001 From: theangelskies <157623774+theangelskies@users.noreply.github.com> Date: Thu, 9 Apr 2026 10:11:08 +0200 Subject: [PATCH 12/12] Update jq/script-01.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Paweł Szymański --- jq/script-01.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jq/script-01.sh b/jq/script-01.sh index 41d71a2d4..4e7f40305 100755 --- a/jq/script-01.sh +++ b/jq/script-01.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail -jq -r '.name' person.json +jq --raw-output '.name' person.json # The input for this script is the person.json file. # TODO: Write a command to output the name of the person. # Your output should be exactly the string "Selma", but should not contain any quote characters.