mirror of
https://github.com/mainmatter/100-exercises-to-learn-rust
synced 2024-12-26 21:58:49 +01:00
12 lines
264 B
Bash
Executable file
12 lines
264 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Ensure the JSON file is provided as an argument
|
|
if [ "$#" -ne 1 ]; then
|
|
echo "Usage: $0 <input_json_file>"
|
|
exit 1
|
|
fi
|
|
|
|
input_file=$1
|
|
|
|
# Use jq to parse the JSON and format the output
|
|
jq -r 'to_entries[] | "/" + .value + " " + .key' "$input_file"
|