Shell - Source of env variables
In many times, we need to know what are the script is being called while setting up the environment variables, this is very handy when we are getting errors like some env variables are not setup.
If zsh is the login shell:
zsh -xl
Execute the below command to get from which file the environment is setup:
PS4='+$BASH_SOURCE> ' BASH_XTRACEFD=7 bash -xl 7>&2
Best Wishes!!
No comments:
Post a Comment
If you have any queries/ any suggestion please do comment and let me know.