Skip to content

Commit 79b4564

Browse files
committed
amended script-02.sh
1 parent d175bfe commit 79b4564

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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
path="/Users/cyf/Documents/SDC/Module-Tools/jq/person.json"
9-
jq -r '.address | "\(.[0]), \(.[1]), \(.[2])"' $path
9+
jq -r '.address | join(", ")' "$path"

0 commit comments

Comments
 (0)