What does the & mean when used in the end of a bash script?

I use a bash script for launching and add a & to the end, like this:

./bin/Startup.sh par1 &

What does the & symbol in the end mean?

Thanks.

1 Answer

It tells the system to run the command in the background. From the bash man page on my system:

If a command is terminated by the control operator &, the shell executes the command in the background in a subshell. The shell does not wait for the command to finish, and the return status is 0. Commands separated by a ; are executed sequentially; the shell waits for each command to terminate in turn. The return status is the exit status of the last command executed.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like