Get downloaded bash profile after deleting ~ / .bash_profile file

I worked with the program and deleted my .bash_profile, which, unfortunately, was not supported for several months. However, I have one terminal that I am not going to close, in which the file is uploaded.

Is there any possible way to "export" loaded bash aliases, etc. from the current terminal?

+6
source share
3 answers
alias > my_aliases 

may give you some aliases, but if you have hundreds, you probably want to use comm(1) to determine which ones are in another file.

+5
source
 declare 

will unload all variables and functions in your current shell. (So ​​it will be set .)

+5
source

You can get at least some of this with the env command:

 env >template_bash_profile 

And then work on it.

+3
source

Source: https://habr.com/ru/post/923766/


All Articles