How do you run terminal commands with a file?


I am working on some Java code, and to compile and run it, i have to separately run five terminal commands. Is there a way to put those commands in a file, and run the file (instead of running the separate commands)?

Such commands are:


You should be able to create a runner for this to execute the commands. You can find instructions on how to do this here:


Thanks, it was useful. Where would I put the file? Under .c9 folder?


The default location is .c9/runners. Runners in this folder should be picked up by the IDE.


Okay, thanks. Also, can I just create a runners folder, if my workspace does not have one?
Secondly, how would i structure having it rum multiple commands?

My theory:
“cmd” : [""] // command 1
“cmd” : [""] // command 2
// and so on…


use script like this


Okay, but, can I still use my theoretical situation? Or, will that not work at all?

My theory:
“cmd” : [""], // command 1
“cmd” : [""] // command 2
// and so on…


no, you need to use script: ["", ""] same as in other runners


Now, since I do not have a .c9/runners folder, can I just create one?
And if I am understand you, can I do this?

script : [
“”, // first command
“” // second command
// and so on…


Okay, next problem. I used code similar to what harutyun had, but i get a error when I try to run it.

It said:
bash: line 1: .c9/runners/ No such file or directory

Here is my .c9 folder directory

I did have to make my runners folder, the project did not have one by default (for some reason).