How to open a new shell in cmd,then run script in a new shell?

前端 未结 4 1429
旧巷少年郎
旧巷少年郎 2021-01-13 20:25

My computer\'s OS is win7

I want to use a .bat file to open a new shell, then run script in a new shell

this shell is OSGeo4W Shell

it is located in

4条回答
  •  逝去的感伤
    2021-01-13 21:07

    I am afraid I haven't used OSGeo4W I just assumed it was using windows. Regardless I'll list some options which work on Linux depending on the shell followed by an example using Cygwin. Maybe it will help..

    -> You can use gnome-terminal Gnome-terminal is a terminal emulation application and the -x specifies you want execute the subsequent command:

    gnome-terminal -x ./script.sh
    

    -> Background Process in the current terminal You can background the first processes by adding an ampersand (&) to the command line or pressing Ctrl+Z when it is running. You then enter "bg" to let the process continue.

    -> You can use xterm and background the process:

    xterm -e ./myProcess3 &
    

    -> An example using cygwin

    cygstart /bin/bash -li
    

    Hope I got all that right, I actually can't test it right now (new windows build PC).

提交回复
热议问题