expect and bash

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Alex_L
Level 2
Level 2
Posts: 96
Joined: Mon Aug 11, 2014 6:59 am

expect and bash

Post by Alex_L »

Hi

I want to write a script with expect that is interactive.
Let's say in pseudo code:
#connect to a server
spawn ssh server.....
#let do something in a loop
#loop
#get some values
# read a
#grepping some output
# a=out|grep a
#use this as input
# send "Value=a\n"
#\loop

I need to know, how to interrupt the spawned process, doing some things in bash and continue with the spawned process, so that i turn in a loop, not every time logging for new.

Thanks.

Al
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Locked

Return to “Scripts & Bash”