Installation manual
Chapter 8 Administering Client Computers 155
Executing Shell Scripts with Remote Desktop
Shell scripts can be copied, then executed. If a script has any degree of complexity, or
if it cannot be expressed on a single line, you can use Copy Items to copy the script le
to the client computers, then execute it using Send UNIX Command. To send a single-
line command you can simply use Send UNIX Command.
To copy and execute a script:
1 Prepare and save your script.
Make sure your script is saved as plain text with UNIX line breaks.
2 Open Remote Desktop.
3 Select a computer list in the Remote Desktop window.
4 Select one or more computers in the selected computer list.
5 Use the Copy Items command to copy your script to the client computers.
For more information, see “Copy Options” on page 11 5 and “Copying from
Administrator to Clients” on page 11 7 .
6 After copying the script, choose Manage > Send UNIX Command.
7 Execute the script by typing:
sh script pathname
8 Click Send.
Executing AppleScript Scripts with Remote Desktop
AppleScript scripts can be executed on client computers in two ways. They can be
saved and executed as an application, or sent at once using the command line.
To learn more about AppleScript, see AppleScript Help in Help Viewer or go to:
www.apple.com/applescript/
To send and execute an AppleScript script:
1 Save the script as an application.
2 Open Remote Desktop.
3 Select a computer list in the Remote Desktop window.
4 Select one or more computers in the selected computer list.
5 Use the Copy Items command with the Open Items option selected in the Copy Items
dialog.
For more information, see “Copy Options” on page 11 5 .