Hi, I have very little training in terminal or node. Could you help me correct an error in a for loop to batch convert JSON files to CSV in terminal?
I have a folder of 380 JSON files but the terminal command below only converts the first JSON file in the directory 380 times (instead of converting all 380 JSONs).
Could you please help me fix the command to batch all 380 files?
for FILE in *.json; do json2csv -i *.json -f attributes.title,relationships.keywords,relationships.principles -o $FILE.csv; done
Hi, I have very little training in terminal or node. Could you help me correct an error in a
for
loop to batch convert JSON files to CSV in terminal?I have a folder of 380 JSON files but the terminal command below only converts the first JSON file in the directory 380 times (instead of converting all 380 JSONs).
Could you please help me fix the command to batch all 380 files?
for FILE in *.json; do json2csv -i *.json -f attributes.title,relationships.keywords,relationships.principles -o $FILE.csv; done