I do like the way [jq](https://stedolan.github.io/jq/) does it with its `--arg` (and/or `--argsjon`) options: ``` $ read quote # user types: "I'm full", said Bob. # see what jq make from that --> properly quoted json $ jq -n --arg q "${quote}" '$q' "\"I'm full\", said Bob." # better, $ARGS.named is a json object of all of them $ jq -n --arg :quote "${quote}" --arg a1 77 --argjson a2 55 '$ARGS.named' { ":quote": "\"I'm full\", said Bob.", "a1": "77", "a2": 55 } ``` So if you don't mind using another tool ([jq](https://stedolan.github.io/jq/)), json_each + readfile from sqlite proper and a temporary file: ``` $ jq -n --arg :quote "${quote}" --arg a1 77 --argjson a2 55 '$ARGS.named' > args.json $ sqlite3 -cmd '.para init' -cmd "insert into temp.sqlite_parameters(key,value) select key, value from json_each(readfile('args.json'))" :memory '.para list' :quote '"I''m full", said Bob.' a1 '77' a2 55 ```