Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Linux Tutorials: expect commands examples

scmuser created the topic: expect command in unix /linux?
Hello,
I am doing a project which asks me to enter password 4 times in a row. I need to enter the same password 4 times. My target is to enter password once and apply it 4 times.
My friend told me to use “expect” command. Can you please give me a sample code to do so.

sample command :- $ ssh @(like :ssh root@127.0.0.1)
enter ‘s password:

Could somebody plz tell me where the command “expect” is used. and wud appreciate if you can write a simple standalone script that uses this command. thanks

rajeshkumar replied the topic: Re: expect command in unix /linux?

Rajesh Kumar
Follow me
Latest posts by Rajesh Kumar (see all)
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x