How to run two async commands in parallel? - command-line

I have a node.js typescript project. So always when I save I need two things:
compile typescript to javascript
restart nodemon
To do that I can run one command in one tab and another in the second. But I want to make a script that does that for me. So I need to do that in one line. What to do?

Related

execvp() function working fine in clion but not in terminal

I tried to run an program, which use container and execvp() function.
When I'm trying to run in the CLion, the program works fine, but when I'm running in my shell, it doesn't work, even when I use CLION's compile file.
it says: "no such file or directory".
Any idea? the arguments that I use looks OK in the two options.
After a long time, I understand what was the problem. I used clone() function to create child to the main process, and I used not right flags.

How to run exported Parameters Variation experiment in a headless environment automatically?

I would like to run an exported Parameters Variation experiment on my Linux machine. Although there is a way for setting a Simulation experiment to start automatically running the batch file (or .sh file for Linux) once the file is opened, I cannot find a similar option for Parameters Variation in which I am running 40 different replications of the same model. In Windows, you need to open the file and manually click the Run button for this.
Considering Linux OS, which is a headless environment, how can I make the model start automatically once I run the command ./mySimulationModel_linux.sh?
Currently when I run this command, the model does nothing. Any help will be appreciated.
The best option would be to add some code to your "Initial Experiment setup:" section to get it to run without any user input
just add run();
Of course, you can add any of other code as well there.

Is "sass --watch" used once per project or every time you are making changes?

I am looking to start working with SASS/SCSS and want some clarification.
If I run the line sass --watch app/sass:public/stylesheets (per the site's example); do I have to type this into the command line every time I want to work on the project or just when starting up a project?
I don't know if this matters but I am developing on a Windows Machine.
You will need this command running as long as you are making changes to your scss files and want them to compile to css. So yes, every time.

Having sbt to re-run on file changes - The `~ compile` equivalent for `run`

I know it's possible to re-compile or re-run tests on file changes. I want know to if it's possible to perform something similar for the run command. ~ run does not work. (That makes sense since the run never finishes).
Is there a way to create a task that watches for file changes, quit the running server and relaunch it ?
If not what other tool, would you suggest to get the same behaviour ?
You will have to bring in an external project like sbt-revolver
https://github.com/spray/sbt-revolver

In TeamCity, can I run a command-line application for the duration of a build?

I have a command-line application that I want to run in a build configuration for the duration of the build, then shut it down at the end when all other build steps have completed.
The application is best thought of as a stub server, which will have a client run against it, then report its results. After the tests, I shut down the server. That's the theory anyway.
What I'm finding is that running my stub server as a command line build step shuts down the stub server immediately before going to the next build step. Since the next build step depends on the server running, the whole thing fails.
I've also tried using the custom script option to run both tools one after another in the same step, but that results in the same thing: the server, launched on the first line, is shut down before invoking the second line of the script.
Is it possible to do what I'm asking in TeamCity? If so, how do I do it? Please list any possibilities, right up to creating a plugin (although the easier, the better).
Yes you can, you can do that in a Nant script, have Teamcity run the script, look for spawn and the nantContrib waitforexit.
However I think you would be much better off creating a mock class that the client uses only when running the tests. Instead of round tripping to the server during the build as that is can be a bit problematic, sometimes ports are closed, sometimes the server hangs from the last run, etc. That way you can run the tests, make sure the code is doing the right thing when the mock returns whatever it needs to return etc.