Wednesday, 19 June 2019

windows - How to stop git-bash shell from waiting for process to finish?


Based on a solution to How do I open a new git bash terminal window at my current location in windows? I can use


$ git-bash

to launch a new terminal from inside a git-bash console window.


However, this will block the original terminal which will be waiting for the result of the new git-bash.


Can I start a new terminal window without having it wait for the result?



Answer



In Bash, you can append & to run a command in the background.


In order to suppress its shell output (if any), you can also redirect its STDERR and STDOUT to /dev/null.


So, use this:


git-bash & > /dev/null 2>&1

When you close the window, the command should also exit in the background.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...