fix newline malformed jsons

This commit is contained in:
2021-11-02 15:04:05 +01:00
parent 5bd5250944
commit f5bc166276
16 changed files with 16 additions and 29 deletions

View File

@ -8,6 +8,7 @@ do
echo "word: $word"
no="$(echo "$line" | cut -f1)"
word="$(echo "$line" | cut -f2)"
json="$(./oed_get_json "$word" "$oed_app_id" "$oed_app_key")"
json="$(./oed_get_json "$word" "$oed_app_id" "$oed_app_key"
tr -d '\n')" # done since newlines can malform json data if appearing mid-string
echo "$json" > json/"$no"_"$word".json
done < "$file"