May 2013
Beginner to intermediate
384 pages
7h 40m
English
Automating interactive input for command-line utilities are extremely useful for writing automation tools or testing tools. There will be many situations when we deal with commands that read input interactively. An example of executing a command and supplying the interactive input is as follows:
$ command Enter a number: 1 Enter name : hello You have entered 1,hello
Creating utilities that can automate the acceptance of input are useful to supply input to local commands, as well as for remote applications. Let us see how to automate them.
Think about the sequence of an interactive input. From the previous code, we can formulate the steps of the sequence as follows:
1[Return]hello[Return]
Read now
Unlock full access