File: irsh

package info (click to toggle)
expect 5.45.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,016 kB
  • sloc: ansic: 17,965; sh: 7,445; tcl: 384; makefile: 191; exp: 10
file content (16 lines) | stat: -rwxr-xr-x 429 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# -*- tcl -*-
# The next line is executed by /bin/sh, but not tcl \
exec tclsh "$0" ${1+"$@"}

package require 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