linux - Create answer file for bash script -
i create answer file elses bash script. when run bash script, asked 5 questions first time install software.
i used yes | ./script command , works, automatically answers yes of questions. however, answer no last question. there way answer yes first 4 questions, , no fifth?
provide answers in way or file directly stdin
./script << eof yes yes yes yes no eof (use y or yes depending on script expect - "y" , "n" enough since yes program works).
for more complex tasks may consider using expect (wikipedia page)
Comments
Post a Comment