Skip to content

Instantly share code, notes, and snippets.

@IamFaizanKhalid
Created June 22, 2023 07:04
Show Gist options
  • Save IamFaizanKhalid/05624ee4c31932be45178696d1b89fe3 to your computer and use it in GitHub Desktop.
Save IamFaizanKhalid/05624ee4c31932be45178696d1b89fe3 to your computer and use it in GitHub Desktop.
Read .env file and print it in JSON format.
awk 'NF' .env | jq -cMR '[inputs | split("=") | {(.[0]): (.[1]) }] | add'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment