Skip to main content
edited body
Source Link
Stéphane Chazelas
  • 584.6k
  • 96
  • 1.1k
  • 1.7k

That's typically what expect was written for:

expect -c 'spawn -noecho vi; send "iHello World!\r\33"; interact'

While expect was written for TCL in days prior to perl or python being popular, now similar modules for for perl or python are also available.

Another option is to issue TIOCSTI ioctls to your tty device to insert characters (one byte at a time) in its input queue:

perl -le 'require "sys/ioctl.ph";
          ioctl(STDIN, &TIOCSTI, $_) for split "", join " ", @ARGV
         ' $'iHello World!\r\e'; vi

That has the benefit of avoiding an extra pseudo-terminal layer in between your terminal emulator and the application (here vi).

That's typically what expect was written for:

expect -c 'spawn -noecho vi; send "iHello World!\r\33"; interact'

While expect was written for TCL in days prior to perl or python being popular, now similar modules for perl or python are also available.

Another option is to issue TIOCSTI ioctls to your tty device to insert characters (one byte at a time) in its input queue:

perl -le 'require "sys/ioctl.ph";
          ioctl(STDIN, &TIOCSTI, $_) for split "", join " ", @ARGV
         ' $'iHello World!\r\e'; vi

That has the benefit of avoiding an extra pseudo-terminal layer in between your terminal emulator and the application (here vi).

That's typically what expect was written for:

expect -c 'spawn -noecho vi; send "iHello World!\r\33"; interact'

While expect was written for TCL in days prior to perl or python being popular, now similar modules for perl or python are also available.

Another option is to issue TIOCSTI ioctls to your tty device to insert characters (one byte at a time) in its input queue:

perl -le 'require "sys/ioctl.ph";
          ioctl(STDIN, &TIOCSTI, $_) for split "", join " ", @ARGV
         ' $'iHello World!\r\e'; vi

That has the benefit of avoiding an extra pseudo-terminal layer in between your terminal emulator and the application (here vi).

deleted 1 character in body
Source Link
Stéphane Chazelas
  • 584.6k
  • 96
  • 1.1k
  • 1.7k

That's typically what expect was written for:

expect -c 'spawn -noecho vi; send "iHello World!\r\33"; interact'

While expect was written for TCL in days prior to perl or python being popular, now similar modules for perl or python are also available.

Another option is to use the TIOCTSI ioctlissue TIOCSTI ioctls to your tty device to insert characters (one byte at a time) in theits input queue of the terminal device:

perl -le 'require "sys/ioctl.ph";
          ioctl(STDIN, &TIOCSTI, $_) for split "", join " ", @ARGV
         ' $'iHello World!\r\e'; vi

That has the benefit of avoiding an extra pseudo-terminal layer in between your terminal emulator and the application (here vi).

That's typically what expect was written for:

expect -c 'spawn -noecho vi; send "iHello World!\r\33"; interact'

While expect was written for TCL in days prior to perl or python being popular, now similar modules for perl or python are also available.

Another option is to use the TIOCTSI ioctl to your tty device to insert characters in the input queue of the terminal device:

perl -le 'require "sys/ioctl.ph";
          ioctl(STDIN, &TIOCSTI, $_) for split "", join " ", @ARGV
         ' $'iHello World!\r\e'; vi

That has the benefit of avoiding an extra pseudo-terminal layer in between your terminal emulator and the application (here vi).

That's typically what expect was written for:

expect -c 'spawn -noecho vi; send "iHello World!\r\33"; interact'

While expect was written for TCL in days prior to perl or python being popular, now similar modules for perl or python are also available.

Another option is to issue TIOCSTI ioctls to your tty device to insert characters (one byte at a time) in its input queue:

perl -le 'require "sys/ioctl.ph";
          ioctl(STDIN, &TIOCSTI, $_) for split "", join " ", @ARGV
         ' $'iHello World!\r\e'; vi

That has the benefit of avoiding an extra pseudo-terminal layer in between your terminal emulator and the application (here vi).

added 418 characters in body
Source Link
Stéphane Chazelas
  • 584.6k
  • 96
  • 1.1k
  • 1.7k

That's typically what expect was written for:

expect -c 'spawn -noecho vi; send "iHello World!\r\33"; interact'

While expect was written for TCL in days prior to perl or python being popular, now similar modules for perl or python are also available.

Another option is to use the TIOCTSI ioctl to your tty device to insert characters in the input queue of the terminal device:

perl -le 'require "sys/ioctl.ph";
          ioctl(STDIN, &TIOCSTI, $_) for split "", join " ", @ARGV
         ' $'iHello World!\r\e'; vi

That has the benefit of avoiding an extra pseudo-terminal layer in between your terminal emulator and the application (here vi).

That's typically what expect was written for:

expect -c 'spawn -noecho vi; send "iHello World!\r\33"; interact'

While expect was written for TCL in days prior to perl or python being popular, now similar modules for perl or python are also available.

That's typically what expect was written for:

expect -c 'spawn -noecho vi; send "iHello World!\r\33"; interact'

While expect was written for TCL in days prior to perl or python being popular, now similar modules for perl or python are also available.

Another option is to use the TIOCTSI ioctl to your tty device to insert characters in the input queue of the terminal device:

perl -le 'require "sys/ioctl.ph";
          ioctl(STDIN, &TIOCSTI, $_) for split "", join " ", @ARGV
         ' $'iHello World!\r\e'; vi

That has the benefit of avoiding an extra pseudo-terminal layer in between your terminal emulator and the application (here vi).

Source Link
Stéphane Chazelas
  • 584.6k
  • 96
  • 1.1k
  • 1.7k
Loading