Re: [Rd] [R] shQuote and cat

2008-07-24 Thread Wacek Kusnierczyk
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

Re: [Rd] [R] shQuote and cat

2008-07-23 Thread Simon Urbanek
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\""*

Re: [Rd] [R] shQuote and cat

2008-07-23 Thread Duncan Murdoch
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

Re: [Rd] [R] shQuote and cat

2008-07-23 Thread Vadim Organovich
;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

Re: [Rd] [R] shQuote and cat

2008-07-23 Thread Duncan Murdoch
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') "\"\

Re: [Rd] [R] shQuote and cat

2008-07-23 Thread Vadim Organovich
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\\\"