gsmsmsspool
来自「开发手机AT指令的源码」· 代码 · 共 37 行
TXT
37 行
#! /bin/sh## /usr/bin/gsmsmsspool: Queues SMS for sending## written by Matthias Goebl <matthias.goebl@goebl.net>SPOOLDIR=/var/spool/smsPRIORITIES=3test -r /etc/default/gsm-utils && . /etc/default/gsm-utilsif [ -z "$1" ]; then echo "Usage: gsmsmsspool NUMBER [MESSAGE]" exit 1fi# the default priority can be overridden by the environment variable GSMSMS_PRIORITYpriority=$PRIORITIEStest -n "$GSMSMS_PRIORITY" && priority="$GSMSMS_PRIORITY"# the default reply email address can be overridden by the environment variable GSMSMS_NOTIFYnotify=`id -un` # default notifytest -n "$GSMSMS_NOTIFY" && notify="$GSMSMS_NOTIFY"tmpfile="$SPOOLDIR/tmp/`date +%s`.$$"umask 022echo "$1 $notify" > "$tmpfile"if [ -n "$2" ]; then echo -n "$2" | head -c 160 >> "$tmpfile"else head -c 160 >> "$tmpfile"fiif [ "`id -u`" = "0" ]; then chown gsmsms:gsmsms "$tmpfile"fimv "$tmpfile" "$SPOOLDIR/queue$priority/"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?