Duncan Murdoch wrote:
> Vadim Organovich wrote:
>> It is precizely a shell command that I am trying to generate. To be
>> specific let's try to have R 'output' the following shell command:
>> 'echo "\"a\""'. This is is a valid command, at least in bash:
>> bash-3.2$ echo "\"a\""
>> "a"
>>
>> Now in
t; cat(shQuote(x), '\n')
'echo "\"a\""'
> system(paste("sh -c",shQuote(x,type="sh")))
"a"
Cheers,
Simon
Again I think cat('echo "\"a\""') should be printing *echo "\"a\""*
he command, only the
string that you want it to print, i.e. for the full command you should use
> cat(paste("echo", shQuote('"a"', type="sh")))
echo '"a"'
Duncan Murdoch
From: Duncan Murdoch [EM
;a\""')
should be printing *echo "\"a\""* (asterics are not a part of the output)
From: Duncan Murdoch [EMAIL PROTECTED]
Sent: Wednesday, July 23, 2008 2:38 PM
To: Vadim Organovich
Cc: r-devel@r-project.org
Subject: Re: [Rd
On 7/23/2008 2:53 PM, Vadim Organovich wrote:
I feel like it now belongs to r-devel more than to r-help.
My output was garbled because I sent the original message as HTML, sorry about
that.
Your output, "\"\\"a\\"\"", is what I get too. That is
> cat(shQuote(shQuote(shQuote("a"))), '\n')
"\"\
I feel like it now belongs to r-devel more than to r-help.
My output was garbled because I sent the original message as HTML, sorry about
that.
Your output, "\"\\"a\\"\"", is what I get too. That is
> cat(shQuote(shQuote(shQuote("a"))), '\n')
"\"\\"a\\"\""
, which I think should be "\"\\\"a\\\"