Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • I have thought about this by changing the exit 1 to return 1 but for this exercise I am not allowed to change the content of script.ph. Commented Nov 24, 2020 at 1:54
  • Thanks a lot! I edited a few syntactic problems according to your notes and moved the echo command outside of the file, and not changed anything about the script.sh. I have also switched to ./ from source. Now the whole thing is working perfect and the main shell process is not terminated after encountering error in script.sh. It seems that the major problem is that the echo command is in the while loop. Commented Nov 24, 2020 at 2:59