2016-07-08 66 views
-1

我是新的期望腳本,我想讓它自動註冊到我們的SCCM。我不知道我的期望腳本有什麼問題?期望腳本說,沒有找到命令

非常感謝!

#!/usr/bin/expect 


## Set all variables 
set server "aaa.com" 
set username "ad\username" 
set pass "password" 

## Enroll into SCCM 
spawn ./tools/CMEnroll -s $server -ignorecertchainvalidation -u $username 
expect "Please enter your password." 
send $pass 
send \n 
expect "Successfully enrolled" 
interact 

exit 0 
當我打開終端,並使用./expect.sh這個文件

,它說:

sudo: ./expect.sh: command not found 

的感謝!

回答