2

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

4
  • script will do that, if I'm understanding your question correctly :)
    – Caesium
    Feb 22, 2012 at 4:07
  • Hm or maybe not, perhaps you're thinking of a chatscript, like what's used to login to a PPP session and similar?
    – Caesium
    Feb 22, 2012 at 4:19
  • Not the one i was looking for. I used it to automatically generate a script when i was ftp'ing to alot of different web servers i was hosting to grab some log files off of each one. Since the machines had different OS's the logins were different meaning the interaction was different. Which meant my expect statements in my script had to be different for each automated login to work. I would run this command im trying to remember and then login to each box and grab what i needed. When i was done it had already logged the entire session based on my input and made a script for entire process Feb 22, 2012 at 4:26
  • @RichardHolloway Thanks Richard... I did what you said Feb 22, 2012 at 13:37

1 Answer 1

2

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .