I have following setup - I have 2 computers connected by serial connection (null modem) emulating vt220. I'd like to send break signal (Magic SysRq) from shell script - is it possible without writing custom program? How to do it?
How to programatically send break signal (Magic SysRq) through serial terminal
shell script;zsh;serial port;terminal emulator;serial console
This is typically done using the tcsendbreak C library routine. You can get to this from the shell by using a Python or Perl one-liner:python -c 'import termios; termios.tcsendbreak(3, 0)' 3>/dev/yourdevicenameperl -e 'use POSIX; tcsendbreak(3, 0)' 3>/dev/yourdevicename