sudo in terminal
sudo in terminal
- Subject: sudo in terminal
- From: Brad Giesbrecht <email@hidden>
- Date: Sat, 06 Oct 2001 13:58:12 -0700
Hello,
I am trying to call a tcsh script from applescript useing Terminal.
Problem is I need sudo for permission's and I don't know how
to pass the password to the shell.
Any ideas?
I havn't figured out how to get applescript to interact with the shell
once I do "do script with command".
If I do do script with command again it opens another shell. I havn't
figured out how to reference the existing shell or "window".
Here's what I have tried.
AppleScript script:
tell application "Terminal"
do script with command "sudo /usr/local/bin/router restart"
end tell
Result in shell: Password:
Thanks for any help.
Bradley Giesbrecht