for example I have a python script:
#!/usr/local/bin/python3.7
import time
n=0
while True:
print(n)
n = n + 1
time.sleep(1)
If I execute the $test.py
in shell like so, I can hit Ctrl+C
to cancel the script at any time.
but if I execute the script like this: $test.py 2>err&
, the only way I can stop the script is using kill
command from another terminal.
I can't find any reference to 2>err&
, what does it really mean?