从 Ubuntu 中的 perl 脚本向 运行 Tcl(预期)脚本发出命令

Command to run Tcl (expect) script from perl script in Ubuntu

我在 windows 中使用以下命令从 Perl 脚本 运行 Tcl(预期)脚本。

system("C:/Tcl/bin/tclsh86 C:/Users/sysadmin/desktop/expect.tcl");

谁能告诉我它在 Ubuntu 中的等效命令。

如果安装了 Tcl 8.6,那就是:

system("tclsh8.6 /path/to/expect.tcl");

如果未安装,请使用 apt-get install tcl8.6(当然需要 运行 作为 root)或使用包管理器 GUI 修复它。