1
To test trap
command I created the following loop in terminal:
while true ; do echo BEGIN ; bash -e ; echo "exit code = $?" ; echo END ; done
How to exit this loop and turn back to the parent shell?
In case of using remote shell (ssh
) instead of bash
there is a delay during connection establishing process when I can press Ctrl+C. But in the above case I can't be fast enough to catch time window.
SIGINT
is Ctrl+C? – Tomilov Anatoliy – 2018-01-19T11:35:34.880@Orient. Yes. See this question.
– Kamil Maciorowski – 2018-01-19T11:58:20.957