Answer the question
In order to leave comments, you need to log in
How to properly terminate a process in Linux from a bash script?
I want to save audio stream via wget command. In order to save the specified time, you need to end the process after a delay.
Here is an example code:
wpid=$!
sleep 60;
kill -1 $wpid
Answer the question
In order to leave comments, you need to log in
It's all about gedit, after creating the file in the nano editor, everything worked fine.
If I were you, I'd start with wget --timeout=<...>
If that doesn't work, I'd continue with timeout -k 1 <...> wget
you are doing something wrong. Please provide the full text of the script.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question