Skip to content
Prev 106520 / 398513 Next

multiline system call

On Fri, 22 Dec 2006, Gabor Grothendieck wrote:

            
Right, but on linux this works
[1] "x" "y"
[1] "x" "y"

so you don't really need input=...

But rereading Nicolas original post, it looks like the problem is 
terminating the input with a ctrl-D.

Perhaps a workaround is to pipe the input into sendmail (I recall sendmail 
accepts input from sdtin) from 'echo'

Note that the single quotes are needed to protect the '\n's until echo is 
ready to act:
[1] "      3       3      10"
I have exim - not sendmail, but this sends a msg from/to me on my linux 
box:

system("echo 'To:cberry\nthis is a test' | /usr/sbin/exim -f cberry at tajo.ucsd.edu -t "

Maybe this will work for Nicolas.
Charles C. Berry                        (858) 534-2098
                                          Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	         UC San Diego
http://biostat.ucsd.edu/~cberry/         La Jolla, San Diego 92093-0717