linux - 'invalid command' error in expect script that is fine in interactive mode -


i have problem in running expect script (very new in this). here have in expect script autorun.exp:

#!/usr/bin/expect -f cd /auto/rmscr/shared_resources/qiuyuguo/softwares/quest_2.4 ./generate_quest_parameters.pl -sam_align_chip a.sam -sam_align_rx_noip \     b.sam -rp mm10_bychr -ap ./output_directory -chip_name name 

after running script, got this:

[qiuyuguo@hpc-uec 20150605]$ ./auto_run.exp invalid command name "./generate_quest_parameters.pl"     while executing "./generate_quest_parameters.pl -sam_align_chip a.sam -s..."     (file "./auto_run.exp" line 3) 

interestingly, content in script runs fine in interactive mode of expect. hint going on?

expect script should have spawn command, expect command , send command.

this example:

#!/usr/bin/env expect  spawn su -l test expect "password: " {   send "xxxxx\r" } expect "# " {   send "exit\r" } expect eof {   exit } 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -