我是DBA和Shell脚本的初学者。我创建了一个脚本来配置Oracle中的应用程序,但是它不接受输入和错误,如下所述。
#!/bin/bash
#!/usr/bin/expect
spawn perl /z00/comn/clone/bin/adcfgclone.pl appsTier /mnt/stage/clone/TEST_testin.xml 2>/dev/null
expect -exact "Enter the APPS password :\r"
send -- "testing@123\r"
expect -exact "Do you want to startup the Application Services for TEST? (y/n) [y] :\r"
send -- "n\r"
expect eof
输出错误:
expect: invalid option -- 'e'
usage: expect [-div] [-c cmds] [[-f] cmdfile] [args]
./apps_config.sh: line 43: send: command not found
couldn't read file "eof": no such file or directory