Pandoc shell script

Hi, I'm trying to create a rule for a folder that will allow me to drop in a markdown file and have it converted to rtf using Pandoc.
I have this command working in terminal:
but when I try using a shell script like:
I receive an error. I wondered whether anyone could provide a hint as to what I'm doing wrong?
Thank you.
I have this command working in terminal:
- Code: Select all
pandoc -s -f markdown testing.md -o testing.rtf
but when I try using a shell script like:
- Code: Select all
pandoc -s -f markdown "$1" -o "$1".rtf
I receive an error. I wondered whether anyone could provide a hint as to what I'm doing wrong?
Thank you.