in reply to Re^3: Automating command line utility
in thread Automating command line utility
And if I respond that on Linux, one doesn't need 'expect' to read from the terminal, you argue that the OP also wants to supply data. Why did you bring up the issue of reading from the terminal then?
As for reading/writing to the same device, I never talked about writing to /dev/tty. All I said was reading. Which is as simple as:
since that isn't any harder than reading from a file, I would recommend that over learning expect.open my $tty, "<", "/dev/tty" or die; while (<$tty>) { chomp; print "Read '$_' from the terminal\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Automating command line utility
by salva (Canon) on Oct 03, 2008 at 11:13 UTC | |
by JavaFan (Canon) on Oct 03, 2008 at 12:17 UTC | |
|
Re^5: Automating command line utility
by moritz (Cardinal) on Oct 05, 2008 at 17:39 UTC |