Re: [R] multiline system call

2006-12-22 Thread Charles C. Berry
Look at the help page for ?system, especially the 'input=' arg. Maybe this sort of strategy will fly: system(sh,intern=T,input=c(echo x,echo y)) [1] x y In your case, maybe system('sh' input=c('sendmail -f [EMAIL PROTECTED] -t [EMAIL PROTECTED]','test','.') or system('sendmail -f

Re: [R] multiline system call

2006-12-22 Thread Nicolas Mazziotta
Dear Sir, Le vendredi 22 décembre 2006 20:05, vous avez écrit : system(sh,intern=T,input=c(echo x,echo y)) Thanks for the advice, but I do not find doc about the input arg for the system function. Besides, $ system(sh,intern=T,input=c(echo x,echo y)) Erreur dans system(sh, intern = T, input =

Re: [R] multiline system call

2006-12-22 Thread Gabor Grothendieck
Its only available on Windows. On 12/22/06, Nicolas Mazziotta [EMAIL PROTECTED] wrote: Dear Sir, Le vendredi 22 décembre 2006 20:05, vous avez écrit : system(sh,intern=T,input=c(echo x,echo y)) Thanks for the advice, but I do not find doc about the input arg for the system function.

Re: [R] multiline system call

2006-12-22 Thread Charles C. Berry
On Fri, 22 Dec 2006, Gabor Grothendieck wrote: Its only available on Windows. Right, but on linux this works system(echo x\necho y,intern=T) [1] x y system(echo x ; echo y,intern=T) [1] x y so you don't really need input=... But rereading Nicolas original post, it looks like the

Re: [R] multiline system call

2006-12-22 Thread Nicolas Mazziotta
Le vendredi 22 décembre 2006 23:31, Charles C. Berry a écrit : Perhaps a workaround is to pipe the input into sendmail (I recall sendmail accepts input from sdtin) from 'echo' This works fine this way. Thanks a lot. (but note that my 2.4.0 linux binary does not accept the input=xyz as an

Re: [R] multiline system call

2006-12-22 Thread Prof Brian Ripley
On Sat, 23 Dec 2006, Nicolas Mazziotta wrote: Le vendredi 22 décembre 2006 23:31, Charles C. Berry a écrit : Perhaps a workaround is to pipe the input into sendmail (I recall sendmail accepts input from sdtin) from 'echo' This works fine this way. Thanks a lot. (but note that my 2.4.0 linux

[R] multiline system call

2006-12-21 Thread Nicolas Mazziotta
Hello, I am trying to call sendmail from within R via system(). As sendmail reads from STDIN, I need to pass a multiline input as an argument. E.g. (not working): system('sendmail -f [EMAIL PROTECTED] -t [EMAIL PROTECTED]') I tried a lot of ways to type the EOL characters, but cannot