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
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 =
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.
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
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
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
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