我需要在bash開始後立即運行命令,然後保持在會話中。 我曾期待過這樣的事情會起作用bash && cd ~/Work
,但明顯地,它會在第一次會話中運行第二個命令,而不是我開始的那個命令。使bash在啓動後立即運行命令,然後保持在此會話中?
我發現這個run bash command in new shell and stay in new shell after this command executes線程,但運行bash --rcfile
不適用於我,因爲我仍然需要加載rcfile。
可能重複到用戶](http://stackoverflow.com/questions/7120426/invoke-bash-run-commands-inside-new-shell-then-give-control-back-to-user) – 2014-04-09 18:47:57