====== sendsms ====== bash skript pro poslani sms pres GSM usb modem # cat sendsms #!/bin/bash #usage: sendsms sm_number=${1:?"missing arg 1 for "} sm_text="" if [[ -p /dev/stdin ]] then sm_text=$(cat -) fi if [ "$sm_text x" == " x" ] then sm_text=${2:?"missing arg 2 for "} fi printf "AT+CMGF=1\r\nAT+CMGS=\"$sm_number\"\r\n$sm_text\x1a" > /dev/ttyUSB3