background process outputs to the console

Posted by broiyan on Ask Ubuntu See other posts from Ask Ubuntu or by broiyan
Published on 2012-12-14T09:20:41Z Indexed on 2012/12/14 11:20 UTC
Read the original article Hit count: 221

Filed under:

Suppose test.sh is a bash script that is empty or contains only exit 0. When the script is backgrounded, what is the significance of the 1 and 16320 printed to the console?

b@sam:~/Documents/bashscripts$ ./test.sh &
[1] 16320
b@sam:~/Documents/bashscripts$ 
[1]+  Done                    ./test.sh
b@sam:~/Documents/bashscripts$ 

Then if user hits ENTER at the command prompt, as illustrated above, another line appears and it shows this

[1]+ Done ./test.sh

What is the significance of the 1 digit and the + symbol?

© Ask Ubuntu or respective owner

Related posts about bash