Set variable to result of send unix command
Set variable to result of send unix command
- Subject: Set variable to result of send unix command
- From: Jeff Hanlon <email@hidden>
- Date: Fri, 05 Apr 2013 20:46:16 +0000
- Thread-topic: Set variable to result of send unix command
Hello,
I'm using an Automator Service to create a send unix command to remote computers in Apple Remote Desktop.
I was wondering if it is possible to get the result of the send unix command and set it to a variable in AppleScript.
Here is a very basic example. I have commented out a few of my failed attempts.
set UNIX_script to "ls /Applications"
set task_name to "Get Enabled Apps List"
tell application "Remote Desktop"
set
this_task
to make new
send unix command task with properties {name:task_name,
showing output:false,
script:UNIX_script,
user:"root"}
execute
this_task on
these_computers
--set myAppList to result
--set myAppList to paragraphs of (text of result)
--set myAppList to paragraphs of (text returned of result)
end tell
I will say that if I do this in an AppleScript and run it locally using
set myAppList
to paragraphs
of (do shell script UNIX_script)
…it works fine. So I'm wondering if there is a problem with the format of the result when run as a send unix command.
FYI, I sent this same question to the remote desktop list but haven't had any replies.
Not sure if it is bad protocol to send the same question to multiple lists, but my question deals with ARD, Automator and AppleScript so I wasn't sure the best place to ask.
Thanks,
Jeff
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden