escaping a single quote from a bash script

view story

http://www.linuxquestions.org – Hi, There is probably a very simple fix, but its wrecking my buzz I call the following on the command line R CMD BATCH '--args Y_filename="one.txt" out="two.txt"' brew.R I want to call this from a bash script but replace one.txt with $1, and two.txt with $2 (ie the first two arguments from the command line) I have tried in vane "R CMD BATCH '--args Y_filename=\"$1\" out=\"$2\"' brew.R" any ideas? Thanks in advance, Brew (HowTos)