I have a Bash script that builds a string to run as a command
Script:
#! /bin/bash matchdir=\"/home/joao/robocup/runner_workdir/mat
I usually place commands in parentheses $(commandStr), if that doesn't help I find bash debug mode great, run the script as bash -x script
$(commandStr)
bash -x script