In ksh, %+ is the last background job.
But what if the script is done in less than 20 seconds:
the previous background job (if any) is killed.
So, this should be used in a script that launch only one background job.
I think you could also use:
Code:
kill %ls
In this case %ls refers to the last background job whose command starts with 'ls'.
So, this should be used in a script that launch only one background job whose command starts with 'ls'.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.