Problems with single quotes in a bash script
I have seen this post but my problem is more complicated and simply replacing single quotes with double quotes won't work. I need to run a R CMD BATCH command with single quotes and double quotes within the single quotes, something like this
echo 'R CMD BATCH --no-save '--args "xxx.txt"' xxx.r' | qsub -cwd &
What should I do?