To terminate the script in case of an error, we can use the “-e” option. When a bash script is “sourced”, called from an alias with a leading dot like my-alias=’. /my-script to execute in the same process, or a function is executed from a terminal window and the script exits on an error, it …
Continue reading “Exit from Bash script on error without closing the terminal window”