Differences between revisions 7 and 11 (spanning 4 versions)
Revision 7 as of 2008-11-11 05:28:14
Size: 233
Editor: ool-43578c69
Comment: You've put it together very well, and covers your life & passions, http://style24.freeweb7.com/goldb82.html aladdin style lamps, =OOO, http://style24.freeweb7.com/goldff2.html diamond omega necklace,
Revision 11 as of 2008-11-22 14:09:27
Size: 679
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
You've put it together very well, and covers your life & passions, http://style24.freeweb7.com/goldb82.html aladdin style lamps, =OOO, http://style24.freeweb7.com/goldff2.html diamond omega necklace, 7776,
----
CategoryCategory
<<Anchor(faq23)>>
== I want to launch an interactive shell that has a special set of aliases and functions, not the ones in the user's ~/.bashrc. ==

{{{
bash --rcfile /my/custom/bashrc
}}}

Variant question: ''I have a script that sets up an environment, and I want to give the user control at the end of it.''

Put {{{exec bash}}} at the end of it to launch an interactive shell. This shell will inherit the environment (which does ''not'' include aliases, but that's OK, because [[BashFAQ/080|aliases suck]]). Of course, you must also make sure that your script runs in a terminal -- otherwise, you must create one, for example, by using {{{exec xterm -e bash}}}.

I want to launch an interactive shell that has a special set of aliases and functions, not the ones in the user's ~/.bashrc.

bash --rcfile /my/custom/bashrc

Variant question: I have a script that sets up an environment, and I want to give the user control at the end of it.

Put exec bash at the end of it to launch an interactive shell. This shell will inherit the environment (which does not include aliases, but that's OK, because aliases suck). Of course, you must also make sure that your script runs in a terminal -- otherwise, you must create one, for example, by using exec xterm -e bash.

BashFAQ/023 (last edited 2016-08-31 00:32:52 by ormaaj)