I'm running bash programmatically from objective c to create a terminal-like application. Once launched I would like to execute some commands prior to turning control over to the user. Normally these would be in the .bash_profile. This file is not accessible to me and not something I would want to mess we anyway as I don't want to effect the standard bash environment for the user. I tried the -c script.sh switch but after script.sh is done running, bash exits. Are there any other options I have other than programmatically typing out the command I need run? I would rather not have the user see everything.
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|
|||
|
|
|
You could try the following:
What the options mean:
The manpage of |
|||
|
|
|
You can invoke bash with For a login shell you would have to mimic bash's behavior with regard to
|
|||
|
|
