expect vs tcl , what is better for automation tasks
Asked Answered
S

1

5

I want to make automation script like

  1. auto rpm installation
  2. long packages installation ( pkgs list with many question in the progress )
  3. auto answering on application installation questions

What is better for this task tcl or expect ?

what is uniq in tcl and better from expect?

Synod answered 13/7, 2015 at 10:37 Comment(3)
Expect is an extension of Tcl. You can give a try with autoexpect.Thracophrygian
can you give more details?Synod
What OS, specifically? Solaris allows for complete automated installation without using add-on tools such as expect. See man pkgask, for example (docs.oracle.com/cd/E23823_01/html/816-5166/pkgask-1m.html).Polestar
K
8

Expect is actually just Tcl plus a few extra commands (notably spawn, expect and send) and it is designed for automating things. Tcl's just a programming language that's designed for making scriptable tools with.

Given that, for automating RPM installation (especially when there's quite a few interactive questions) the right choice is definitely Expect. Just remember: you can use the power of Tcl inside Expect where you need it. You've got a full programming language available to you. That lets you do really complicated stuff if you're inventive…

Kowalewski answered 13/7, 2015 at 10:46 Comment(3)
The one thing that Expect isn't good at is automating GUI applications. It only automates things in terminals.Kowalewski
you mean that - I can write real tcl command in to expect script inside?Synod
You can use Tcl commands in an Expect script. Expect is exactly Tcl plus a package of commands (called Expect) that add the subprocess automation features.Kowalewski

© 2022 - 2024 — McMap. All rights reserved.