ram*_*tan 5 unix linux bash openwrt
我有一个 minicom 命令,通过调制解调器使用 SSH/Putty 发送短信,这是命令
AT^HCMGS="destination number"<press ENTER>
> SMS message <press CTRL + Z>
Run Code Online (Sandbox Code Playgroud)
使用 minicom 成功执行命令
我想问如何在bash中模拟按ENTER&CTRL+Z 我可以这样写脚本吗?
#!/bin/bash
echo -e -n "AT^HCMGS="888"(I don't know how to insert enter/return)" > /dev/ttyUSB0
echo -e -n "SMS message (I don't know how to insert ctrl+z)" > /dev/ttyUSB0
Run Code Online (Sandbox Code Playgroud)
我想在openWRT中集成一个程序(motion linux)和这个脚本
谢谢你!
小智 0
$ man skill:
SYNOPSIS
skill [signal] [options] expression
PROCESS SELECTION OPTIONS
-t, --tty tty
The next expression is a terminal (tty or pty).
EXAMPLES
skill -KILL -t /dev/pts/*
Kill users on PTY devices.
Run Code Online (Sandbox Code Playgroud)
所以它应该是这样的(无法验证):skill -STOP --tty /dev/ttyUSB0