Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Execute shell command asynchronously?


From   [email protected] (Brendan Halpin)
To   [email protected]
Subject   Re: st: Execute shell command asynchronously?
Date   Fri, 25 May 2012 12:06:33 +0100

On Tue, May 22 2012, Brendan Halpin wrote:

> On Tue, May 22 2012, Phil Clayton wrote:
>
>> What's wrong with -winexec-?
>
> Yes. The only problem with winexec is with me: I subliminally read it as
> Windows-specific and glossed over it as irrelevant. It seems to fit the
> bill. 

Now that I come to try it out, I find my inattention to detail is even
worse, and since winexec require GUI (under linux) it doesn't meet my
needs.

To step back: what I am trying to do is to create PDF and PNG graphics
in batch mode (or console mode). A good general strategy under Linux is
the following

. graph export something.eps
. !epstopdf something.eps
. !convert -density 200 something.pdf something.png


However, I'm creating many graphs, and as they are data rich (c.
1,000,000 points in a bunch of -combine-d scatterplots) the conversion
takes a long time and blocks the Stata process. Hence I'd like to run
the shell commands asynchronously, but appending an ampersand as in
-!epstopdf something.eps &- doesn't seem to work, in that it blocks the
Stata process until it completes.

Nor does 
. !(epstopdf something.eps &)
nor
. !(nohup epstopdf something.eps &)


Any ideas?

Brendan

PS: epsdopdf comes with TeXLive; convert is a command-line interface to
ImageMagick; they render moot the fact that batch/console Stata has some
graphics output limitations. 

-- 
Brendan Halpin,   Department of Sociology,   University of Limerick,   Ireland
Tel: w +353-61-213147  f +353-61-202569  h +353-61-338562;  Room F1-009 x 3147
mailto:[email protected]    ULSociology on Facebook: http://on.fb.me/fjIK9t
http://teaching.sociology.ul.ie/bhalpin/wordpress         twitter:@ULSociology
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index