⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1.a.intro

📁 测试中用于交互的一个脚本.在自动化脚本中会用得到.希望对您有帮助.
💻 INTRO
字号:
	Why is this tool useful?	Chances are if you are reading this you probably have already usedthe fine Expect for tcl, and possibly even read Exploring Expect. You areinterested in learning how to accomplish the same things you've done in tclusing perl, or perhaps are just totally irritated at tcl.	Expect is a generic tool for talking to processes that normally requireuser interaction. This might be running an ftp client to grab a file,telnetting to a router to grab statistics or reset an interface. Or, as in thecase of a place I recently administered, to start up a secure webserver withouthaving to be physically at the machine to enter the super secret password.	Expect talks to processes through ptys. To it, a process is mostly justa bidirectional file handle, much the same as a socket. In fact, it is possibleto take a filehandle you've already used and pass it off to expect to interactwith.	Now, something you might say at this point is "well, but there aretools that I can use to do that with for more common protocols like telnet andftp already, such as Net::Ftp and Net::Telnet. Why would I want to use yourtool?". This is true. You might never want to use it. However, there are a fewadvantages Expect has over similar modules:	1. A consistent interface. You don't have to remember the syntax forthe other tools.	2. It is more intuitive (my opinion, of course) because you alreadyknow how to use the clients you are familiar with. Once you learn how totalk to a process using Expect you will have an easy time automating your other tasks.	3. It is more versatile. With Expect you can connect multipleprocesses together, write to log files, talk to sockets, etc.	4. Consistent debugging. Debugging, IMHO, is much easier in Expectthan in other tools because you have the ability to watch the interactiontake place, and it's really pretty easy to use.	One serious disadvantage of Expect is that scripts generated using itare generally non-portable. The way a client 'looks' is important to buildinga script to talk to it. Interacting with a client on DG-UX may be verydifferent than the equivalent client on SunOS. Or, and ncftp would be a goodexample of this, a client may be different between versions. Similarly, ifan administrator changes versions of a server it might send back differentprompts than what you are looking for. These are things you should be aware of.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -