A DevOps friend of mine came up with this problem. The following script works without a problem:
#!/usr/bin/env python3
import os
for k, v in os.environ.items():
print(f'{k}={v}')
When you try to do the same thing with a one-liner on the shell, using the …