Skip to content

Commit 70e7660

Browse files
committed
Add jq commands to output formatted name, profession, and player names
- script-03.sh: Output the person's name and profession in the required format. - script-04.sh: Output each player's name on a separate line as required.
1 parent 974363c commit 70e7660

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

jq/script-03.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ set -euo pipefail
55
# The input for this script is the person.json file.
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.
8+
9+
jq -r '.name + ", " + .profession' ./person.json

jq/script-04.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ set -euo pipefail
66
# TODO: Write a command to output just the names of each player, one per line.
77
# Your output should contain 6 lines, each with just one word on it.
88
# Your output should not contain any quote characters.
9+
10+
jq -r '.[].name' ./scores.json

0 commit comments

Comments
 (0)