ins*_*erg 7 linux shell cygwin tty term
有没有办法在执行后发送类似"数据结束"的内容
echo "test" > /dev/tty1
为了获得"输入光标"回到"接收"终端(在这种情况下为tty1)?
截图:http://picload.org/image/acdwigg/tty.png
Rei*_*hin 2
使用echo > /dev/tty你无法实现这一点。但是您可以通过向正在使用该 tty 的进程发送信号来做到这一点。
echo > /dev/tty
例如:
kill -s SIGINT `ps -ft pts/2 | grep pts/2 | cut -d ' ' -f 5`
归档时间:
12 年,7 月 前
查看次数:
24914 次
最近记录:
8 年,1 月 前