0

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!

itd
  • 123
  • 6

1 Answers1

0

Use rtl_fm “$@“ & sleep 5 ; pkill rtl_fm ; do_other_things. Here “$@“ are the arguments passed to your script, replace it with those.

user2497
  • 681
  • 5
  • 8