Reputation: 534
I am trying to create a shell script that opens three new msys terminals and let each run a specific set of commands or let each run shell files containing the commands.
What I am trying to do is to have the following:
somepath/startAll.sh
somepath/a/first.sh
somepath/b/second.sh
somepath/c/third.
Then be able to run the startAll.sh
script which starts three new msys terminals which runs the first.sh
, second.sh
and third.sh
scripts, respectively.
I am working on Windows7 and tried a lot of things, but nothing works..
I am really stuck on this one, my shell scripting skills are not that evolved yet, so any help would be much appreciated. Thanks in advanced!
On another note: I saw someone comment on another similar question that msys and mingw[32] is not the same thing. Although when installing msys/mingw a autogenerated desktop shortcut was called msys was created, and it starts a mingw32 terminal? I apologize in advance if I mix the two.
Upvotes: 2
Views: 3859
Reputation: 604
Assuming the only bash in your command prompt is the msys one, you can go with:
start bash
start bash
start bash
then just execute it with "bash scriptfile.sh". If you have other bash executables, just use an absolute path. Each bash can have a different command after it to run, that could be a script file.
Edit: I just double checked this, and apparently the windows close as soon as they are done when you include a command. Not sure that is an acceptable solution for you, or how to fix it.
Upvotes: 3