I attempt to move my shell script to scala code with package of sys.process.
I find it can't save the shell context, that means, I can't replace "ls ./somedir" ! with "cd ./somedir" ! "ls ./" !.
(ps: In this way, notation ! will consume string as shell command and execute it after import sys.process._ in scala)
How to execute shell commands and save it context just like terminal does?
also, hope it could support ssh name@host to open a remote session.
Thanks.