Groups | Search | Server Info | Login | Register
Groups > alt.comp.lang.shell.unix.bourne-bash > #273
| From | Daniel L Newhouse <dlnewhouse@gmail.com> |
|---|---|
| Newsgroups | alt.comp.lang.shell.unix.bourne-bash |
| Subject | startup script |
| Message-ID | <2rhtdg1gt2p2snos8bkft0b394dlrl2lf7@4ax.com> (permalink) |
| Organization | Forte - www.forteinc.com |
| Date | 2021-07-02 03:00 -0500 |
To answer my original question, yes there is, and here is the quote from O'Reilly's Larning the Bash source executes the commands in the specified file, in this case .bash_profile, including any commands that you have added. bash allows two synonyms for .bash_profile: .bash_login, derived from the C shell’s file named .login, and .profile, derived from the Bourne shell and Korn shell files named .profile. Only one of these three is read when you log in. If .bash_profile doesn’t exist in your home directory, then bash will look for .bash_login. If that doesn’t exist it will look for .profile. One advantage of bash’s ability to look for either synonym is that you can retain your .profile if you have been using the Bourne shell. If you need to add bash-specific commands, you can put them in .bash_profile followed by the command source .profile. When you log in, all the bash-specific commands will be executed, and bash will source .profile, executing the remaining commands. If you decide to switch to using the Bourne shell you don’t have to modify your existing files. A similar approach was intended for .bash_login and the C shell .login, but due to differences in the basic syntax of the shells, this is not a good idea. Cameron Newham. Learning the bash Shell (In a Nutshell (O'Reilly)) (pp. 89-90). O'Reilly Media. Kindle Edition.
Back to alt.comp.lang.shell.unix.bourne-bash | Previous | Next | Find similar
startup script Daniel L Newhouse <dlnewhouse@gmail.com> - 2021-07-02 03:00 -0500
csiph-web