Spawn subshell for SSH and continue with program flow

前端 未结 7 1118
别那么骄傲
别那么骄傲 2020-12-19 16:28

I\'m trying to write a shell script that automates certain startup tasks based on my location (home/campusA/campusB). I go to University and take classes in two different ca

7条回答
  •  春和景丽
    2020-12-19 16:31

    Maybe screen + ssh would fit the bill as well?

    Something like:

    screen -d -m -S sessionName cmd
    
    screen -d -m -S sessionName cmd &
    
    # reconnect with
    screen -r sessionName
    

提交回复
热议问题