async vs sync shells

I am calling a shell script using PL/SQL stored procedures. This works great but I need the calls to be run synchronously and not asynchronously. I need the shell script to finish before returning control back to the procedure. Any ideas?

Not sure I understand but if you are calling one script from another, check out the wait command. This may be what you need.

Let me try to be more clear.

I am using pl/sql to call external scripts using the dbms_pipe utility in oracle. This utility is async by default. The scripts are fired and could run from 20 minutes to three hours depending on the size of the files. I need the script to complete the one run before allowing the user to start another one. Hope this helps.

This sounds more like an issue with the database utility.
You could, however, write it in such a way that when the script begins, it places a "flag" file somewhere, say named something like "dont_run_again". Now, if someone tries to run this twice, it should check for the existance of this file, and quit without running if it finds it. Then, at the end of the original script, remove the file...