Objective:
- script-0.sh: produces infinite lines of output.
- script-1.sh: takes a line as input, if that line contains pattern X it must kill script-0.sh.
Proposed partial solution:
- run: ./script-0.sh | ./script-1.sh PID.
- If script-1.sh detects pattern X in its input, it calls 'kill -INT PID' and thus kills script-0.sh.
Problem:
- How do I assign the correct value to variable PID?