Various Linux scripts.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
394 B

#!/usr/bin/env tclsh
# Выполнение команды с правами администратора
# Используется с dmenu
# suDo <command> <password>
package require Expect
proc execCommand {command password} {
spawn bash
exp_send "su -c \"$command\"\n"
expect -nocase "password: "
exp_send "$password\n"
expect eof
}
execCommand [lindex $argv 0] [lindex $argv 1]