Questions tagged [expect]
80 questions
0
votes
1 answer
Trim and allign an output of command in expect script
{ echo ' ' ;echo ' IP : ' ;ip route get 8.8.8.8 | cut -d' ' -f7,8 | tr -d 'src' ;echo ' ' ;dmidecode -t bios | grep -iw 'Version' ;echo ' ' ;}
the output of above command mentioned is:
IP :
10.0.0.1
Version: 1.8
but i want to allign it…

GauravG
- 19
- 7
0
votes
1 answer
how to use ping in expect script
Need assistance while i want to ping server if got reply then proceed with script and if no reply go again to previous step where we fetch IP from hosts.txt
#Setting up Variables
set timeout 5 …

GauravG
- 19
- 7
0
votes
0 answers
Expect Script: First ping the IP stored in hosts.txt file and if got response of ping run script
for below code i want to check if the IP is up via ping and if ip is up run below code eles check next ip from hosts.txt
Edit 2: FYI ill be running script from windows machine
Edit 3:I managed to write incorporate a line,now with this script is…

GauravG
- 19
- 7
-1
votes
1 answer
kpcli bash script to automate entries
I am trying to create a bash script which uses kpcli in order to automate entries into a kdbx file. While searching over here I found out that you
could use expect and send, however this does not seem to be working for me.
set timeout 10
spawn…

JohnBorg
- 1
- 1
-1
votes
3 answers
Linux + how to run the ssh-keygen interactive from bash script
Please advice how to generate the file id_rsa.pub without answering the questions from "ssh-keygen -t rsa"
my target is to run the ssh-keygen from bash script from postgress USER, and it must run interactive , or maybe run the id_rsa.pub with…

shalom
- 461
- 13
- 29