#!/bin/bash
truncate --size=$(expr $(stat --format=%s saveurls.json) - 10) saveurls.json
cat add_json.txt | sed "s/ /\":\"/g" | sed "s/^/\"/g" | sed "s/$/\",\n\"\":\"\"}]';/g" >> saveurls.json
# add_json.txt should look like this: "[http url] [ipfs url]\n"
# end of saveurls.json if it's missing that:
# $ echo "\"\":\"\"}]';" >> saveurls.json
