I'd like to write a CVS wrapper script that executes the command on another machine using RSH but am having trouble with quotes.
#!/bin/csh -f
rsh <machine> cvs $*:q
The problem is that even though the arguments are passed with quotes RSH seems to drop them when the command is executed. The following command should appear as 3 arguments at the destination but has 4 instead.
cvsWrap diff -D "2011-05-01 00:00:00"
I'm not looking for advice on how not to use rsh since I'm really using qrsh, an rsh-compatible version for SGE. I considered using an interpreter but I don't know how to escape the quotes within strings:
rsh <machine> /bin/csh -c "cvs $*:q"
I'm most familiar with c-shell but would be willing to consider a bash script if someone were to write it. How can I write this CVS script?