I have a pipeline like so:
tail -n0 -f "${my_input}" | ql_receiver_lock_holder | while read line; do
echo "$line" >> "${my_output}";
# xxx: how can I programmatically close the pipeline at this juncture?
done & disown;
my question: is there a way to programmatically close the pipeline where it says xxx? I could probably just call exit 0;
but I am wondering if there is a way to close the current pipeline somehow.
while
at all?ql_receiver_lock_holder | (read line; echo ...) & disown
would work just as well for that. Or do you want to end the loop? In which case a simplebreak
would do. – muru Apr 23 '18 at 06:04break
out of the loop, but it is really difficult to understand what you want to archive. – Raphael Ahrens Apr 24 '18 at 07:21