DEV Community


Discussion on: Creating an opinionated GraphQL server with Go - Part 1

xuanlong5 profile image

Too complex with row: unset $(grep -v '#' .env | sed -E 's/(.)=./\1/' | xargs).

It takes many my times to research bash shell script

cmelgarejo profile image
Christian Melgarejo Bresanovich Author

Actually this line just takes the .env file (that you should copy from .env.example, and modify accordingly) and uses sed and xargs to line by line (without comments) un-export the environment variables, just a convenience script, no need to use it if you don't want to :)