Getting pid and error from do shell script
Getting pid and error from do shell script
- Subject: Getting pid and error from do shell script
- From: Luther Fuller <email@hidden>
- Date: Sat, 23 Dec 2006 15:47:05 -0600
I have a script with something like this ...
do shell script the result & " &> /dev/null & echo $!"
set pid to the result
I have another script with something like this ...
"hdiutil convert " & inFile & " -format UDZO -encryption -o " & outFile
try
do shell script the result
on error
return -- here if user cancels encryption
end try
In the second script, I need the error because the user may click the
Cancel button in the encryption dialog.
My problem is that I also need to get a pid from the second script if
the user does NOT click Cancel. I have read TN2065 "do shell script
in AppleScript" for the third time, but it offers no understanding of
this problem. (It recommends that I "See the sh man page under
"Redirection" for more details." ... but there is no man page for sh!)
Does anyone know an answer?
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden