Running rtl_fm from a parameterized script?

Main forum to discuss RTL-SDR related topics.
Post Reply
User avatar
ab1jx
Posts: 9
Joined: Mon Jun 19, 2017 2:24 pm
Location: Heath, MA USA

Running rtl_fm from a parameterized script?

Post by ab1jx » Mon Jun 19, 2017 2:37 pm

I'm trying to run this, so I can pass in the frequency as the first argument to the script. But when I run it the script gets clobbered by an IQ recording. I tried escaping the $ with an \ and the same thing happens. My script name was just "am", the same as the modulation parameter, that might be a mistake. But running this like "am 80000000" gives me an IQ recording named am.

Oh, the shell is sh. Testing under OpenBSD, hence the -S which I think was a patch added by Stuart Henderson to use synch mode.

Code: Select all

#!/bin/sh
rtl_fm -f  $1 -M am -S -s 12k -g 50 -l 75 - | play -r 12000 \
-e  signed-integer -b 16 -c 1 -t raw -
Normally the first parameter passed to a script replaces the $1 but that's not happening.

Post Reply