I have a Bash script of a thousand lines each containing an ffmpeg command. I start this with source script and it runs just fine.
However, when I try to take control of this script in various ways, things go completely awry:
- If I do
Ctrl + Zto pause the whole thing, only the currentffmpegcommand is paused, and the next one is started! Not what I wanted! - If I do
Ctrl + Cto stop everything, the script jumps to the nextffmpegcommand, and I have to press once for every line in the script to finally stop everything. Sheer hell. - I tried using
ps -effrom another shell to locate thesourcecommand to pause/kill it from there, but it does not exist in the list.
So how can I pause/stop the parent script the way I wish? Or possibly, how can I execute the script in a different way to begin with that gives me the proper control over it?