#!/usr/bin/env python3 # jsonenv reads a json object as input and produces # escaped shell commands for setting environment vars import json import pipes import os import sys for k, v in json.load(sys.stdin).items(): k = pipes.quote(k) v = pipes.quote(v) print("%s=%s" % (k, v))