Re: "do shell script" hangs
Re: "do shell script" hangs
- Subject: Re: "do shell script" hangs
- From: Christopher Nebel <email@hidden>
- Date: Fri, 21 Jun 2002 12:29:35 -0700
On Friday, June 21, 2002, at 01:47 AM, Daisy wrote:
It is possible to detach a "do shell script" command using only shell
operators, though how to do so isn't particularly obvious. Try this:
do shell script "put_command_here >/dev/null 2>&1 &"
Of course, you'll have to deal with monitoring the task yourself. This
trick was originally discovered by Stuart Roebuck.
many thanks for this suggestion, but that woudn't help in my case (i
wanted to make a shell script that redirects the standard output to a
file (sth of this kind: nireport ... > filename) so using your ">
/dev/null ..." will result nothing because it sends the output to
'nirvana'. (joel's perl daemon solution is a little bit complicated but
worked fine for me)
Actually, a quick experiment here shows that the technique works just as
well if you substitute a real file for /dev/null. The relevant part is
that all output is directed away from the parent process, who then
doesn't wind up waiting for it.
--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.