Screencapture Terminal command and then return to Shell script

Solution 1:

The problem isn't that control is not being returned to your script, it's that the output from the echo command isn't being captured and reported to you. It could be that Alfred is closing the transient Terminal.app window that it's using to run the script. To test that add a sleep 60m to the end of the script which should keep the window on the screen.

Or it could be that all stdout/stderr from the script is going to /dev/null or something similar. Make sure Alfred isn't throwing away the output. Based on our comment conversation it sounds like that's what Alfred does with std I/O.