I need to run the command right after the bash starts and then stay in the session.
I was expecting something like that would work bash && cd ~/Work
, but, apparentely, it would run the second command in the initial session, not the one I'm starting.
I've found this run bash command in new shell and stay in new shell after this command executes thread, but running bash --rcfile
doesn't work for me, because I still need the rcfile to be loaded.
The bash WAIT command is used to halt the execution of a script until all background jobs or specified JobID/PIDs terminate successfully and return an expected exit code to trigger the next command that was “waited for.”
You run the shell script (pure. bat on Windows and pure on Linux®) from the pure. cli/bin directory on your local computer. In this procedure you start in interactive mode, specifying the host name or IP address for the system, along with an authorized user ID and password to start a user session.
You can still use --rcfile
, you just need to include the sourcing of the default rc file in your command list:
bash --rcfile <(echo ". ~/.bashrc && cd ~/Work")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With