MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

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?

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Linux Commands and Shell Scripting Reference for Linux Admins and DevOps Engineers

A structured Linux command and shell scripting reference for operations and DevOps work, rebuilt from the original link collection. It includes a practical learning workflow, command comparison tables, ready-to-use examples, and curated source links.

Read More

Shell script to Enable ssh password authentication in Linux

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

How to login linux server using ssh?

You log in to a Linux server over SSH by running ssh username@server-ip from an SSH client, then proving who you are with either a password or…

Read More

Shell Bash Scripting: Assignment & Excercise – 4

This exercise asks for a Bash script that checks CPU usage and sends an email when it goes over a threshold. The script above reads /proc/stat, but…

Read More

Wetty – How to Install & Access Wetty (Web-based SSH) on AWS EC2 linux to access using browser

Wetty is a web-based terminal. It runs a small Node.js server that opens an SSH session and streams it to your browser over WebSockets, so you can…

Read More

Shell Scripting Tutorials: Function

A Bash function is a named block of commands that takes arguments as $1, $2, … and $@, and hands results back through its output or its…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x