Linux command that builds a shell script automatically after you run a command

Alright I'm drawing a blank here but I know I used to run some linux command that would automatically generate a shell script for me based on how i interacted with the shell. Example: If i remember right i would prefix my command id like to run with the command i'm trying to remember and it would automatically build my shell script based on the filename i gave it to output. Like this...

<command> telnet "whoever" > file.sh 

I dont know if that's how i use to run it but i think it was close.

The command logged the telnet session and based on my input of username and password it generated a script automatically based on that criteria I typed. This was just one example that i used it for. It was a good command to save time in writing a script to automate certain things that required user intervention.

Anybody know what im talking about? Im pretty sure its a standard linux command but last time i used it was probably ten or twelve years ago before Ubuntu, when Red Hat was still just Red Hat

5

1 Answer

PROBLEM SOLVED!!! Ok i found it. I had to download it but the command is autoexpect. It automatically generates an EXPECT script by watching the entire process. Example: autoexpect -f autologin.sh telnet 192.168.1.1 This will automatically build a script for me called autologin.sh and automate everything that i previously just did in the telnet session. Thank you for your help anyways.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like