This repository has been archived on 2025-11-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
rustex/helpers/json2redirects.sh
2025-02-19 10:34:15 +05:30

13 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"