Re: shell script
Re: shell script
- Subject: Re: shell script
- From: "Mark J. Reed" <email@hidden>
- Date: Sat, 17 Jul 2010 21:48:59 -0400
Note that 'do shell script "foo &"' doesn't actually cause the do
shell script to return right away; it still waits for the command to
exit. You have to detach the shell script from the pseudo-terminal
that "do shell script" creates by redirecting its input and output.
But then any output printed by the script disappears (you can replace
/dev/null below with the path to a log file if you want to capture the
latter).
I think a separate script file is cleaner, but it works without one:
do shell script "(
counter=0
while [ $counter -lt 180 ]
do
if [ -f ~/Desktop/testfile.txt ]
then
rm ~/Desktop/testfile.txt
exit
fi
echo \"working\"
say \"working\"
sleep 5
counter=`expr $counter + 1`
done) </dev/null >/dev/null 2>&1 &"
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden