Pass Parameter to Shell Script

I have a shell script that takes a file name as a parameter, and since there are usually spaces in the name I surround it with quotes, the file name that is. The file name is in the clipboard. So I open a terminal window and type:
./addsub.sh "^V"
where that ^V pastes the file name in between those quotes.
Can I do this in Keyboard Maestro?
I've tried every way I could think of, including using the $KMVAR_ to pass the parameter from a variable, but so far I haven't gotten anything to work.
Thanks in advance.

Just to be sure... the script works when manually entered in Terminal and you've tried this?

Thanks for the reply! Actually I did try that, or a variation of it. The problem seems to be that I moved the scripts to a different folder and I didn't fully account for the move in the script. My bad!
Thanks again!

1 Like