Skip to content

mingbowan/send2tty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

send to tty

a very simple tool to send input to another tty (assume you have the rights), usually you can do

echo some string> tty_file 

in shell. But if the other tty is waiting for input, like

read myVar

it cannot determine the end of line, thus block the process this small tool can help to unblock the tty, useful if you have something running in background/batch, waiting for "Y/N/All" etc. and you don't have terminal open.

compile

you only need gcc, then

gcc -o send2tty send2tty.c

Usage

send2tty tty_file_name chars_you_want_to_send

example

send2tty /dev/pts/23 Y

About

small tool to send input to another tty, fix problem by "echo >tty" not working if tty is waiting for input

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages