1#!/depot/path/expect --
2
3# Do rsh interactively.  For example, consider the following command:
4#    rsh <remote> ls -l "|" more
5# where it would be nice to get a listing page by page
6
7spawn -noecho rlogin [lindex $argv 0]
8set timeout -1
9expect "% "      ;# customize appropriately
10send "[lrange $argv 1 end];exit\r"
11interact
12