summaryrefslogtreecommitdiff
path: root/example/irsh
blob: 029c8c87109abcfb2f0785d2a35793a51b744053 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/depot/path/expect --

# Do rsh interactively.  For example, consider the following command:
#    rsh <remote> ls -l "|" more
# where it would be nice to get a listing page by page

spawn -noecho rlogin [lindex $argv 0]
set timeout -1
expect "% "      ;# customize appropriately
send "[lrange $argv 1 end];exit\r"
interact