I'd like to know if it's possible to run rtl_fm from a .sh file: I know it's possible, but what I'd like to do is to run it, record for 5 seconds (I can place a sleep here) and stop the process (in the terminal, you need to do Crtl+C to do this). Or maybe there is an option to run it for a specific time? If it's not possible through a .sh script, maybe I could do it through a Python script, but still I'd need some help on this. Thanks!
-
I have no idea what you are trying to do, but I'm sure it's possible.John Hawthorne– John Hawthorne2018年04月17日 16:58:23 +00:00Commented Apr 17, 2018 at 16:58
-
see the answer belowitd– itd2018年04月18日 07:17:26 +00:00Commented Apr 18, 2018 at 7:17
1 Answer 1
Use rtl_fm "$@" & sleep 5 ; pkill rtl_fm ; do_other_things
. Here "$@" are the arguments passed to your script, replace it with those.