abhigenie92@ubuntu:~$ (sleep 2; echo $BASH_SUBSHELL ;sleep 2)
1
abhigenie92@ubuntu:~$ (sleep 2; echo $BASH_SUBSHELL ;sleep 2)&
[1] 3297
abhigenie92@ubuntu:~$ 1
[1]+ Done ( sleep 2; echo $BASH_SUBSHELL; sleep 2 )
What happens when launch it as a background process, why don't I get the prompt back and I have to press Enter
? In both cases it launches a child shell.
bash
doesn't report that the job is done until the next prompt is displayed (whereas, for example,zsh
does)? – Celada Mar 07 '16 at 20:05