executesudounix
executesudounix
SHELLCOMMAND
,
PASSWORD
,
RESULT
,
TIMEOUT

The executesudounix statement executes a UNIX shell command using sudo (root) privileges.

Parameters

This statement has four parameters:

shellcommand – Exact text of shell command.

password – Password (if empty then will prompt for password).

result – Output of shell command.

timeout – Timeout in seconds (default is 60 if not supplied).

Description

This statement executes a UNIX shell command using SUDO (root) privileges.

executeunix {chown myname afile},"",ux

Note: This statement has been superceded by the shellscript statement and shellscript( function.

See Also

- applescript -- executes an AppleScript.
- applescript( -- executes AppleScript source code and returns the result.
- blindposixscript( -- executes a POSIX shell script using NSTask and returns the process id.
- executeapplescript -- compiles and runs an AppleScript.
- executeperlscript -- executes Perl code.
- executeunix -- executes a UNIX shell command.
- perl -- executes a Perl script (program).
- perl( -- executes a perl program and returns the result (stdout).
- php -- executes a PHP script (program).
- php( -- executes a PHP program and returns the result.
- posixscript( -- executes a POSIX shell script using NSTask and returns the result.
- python -- executes a Python script (program).
- python( -- executes a python program and returns the result (stdout).
- ruby -- executes a Ruby script (program).
- ruby( -- executes a ruby program and returns the result (stdout).
- scriptbglog -- specifies a path/file for output from STDOUT from embedded programs run in the background (Perl, Ruby, Python, PHP).
- scripttimeout -- sets the maximum runtime allowed for an embedded program (AppleScript, ShellScript, Perl, Ruby or Python).
- shellscript -- executes a UNIX shell script.
- shellscript( -- executes a UNIX shell script and returns the result.
- usebashprofile -- grabs the search path from the `.Bash_profile` file in the user's home folder, so that these paths will be used by scripting languages (*Ruby, Python*, etc.).
- xcallbackurl -- performs an action in another application using the x-callback-url mechanism.

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama 6.0.