1
0
mirror of https://github.com/AG7GN/nexus-utilities.git synced 2025-05-18 07:30:07 -07:00

Update patmail.sh

This commit is contained in:
Steve Magnuson 2019-11-23 10:01:36 -08:00
parent 00326ab6f4
commit 1d787f7d0f

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
VERSION="1.0.7" VERSION="1.0.8"
# This script allows sending Winlink messages via the command line or script. # This script allows sending Winlink messages via the command line or script.
# It requires pat (a Winlink client) and the dos2unix programs. # It requires pat (a Winlink client) and the dos2unix programs.
@ -58,7 +58,7 @@ SUBJECT="$2"
export EDITOR=ed export EDITOR=ed
TFILE="$(mktemp)" TFILE="$(mktemp)"
echo -e "$CALL\n$TO\n\n$SUBJECT" | pat compose 2>/dev/null 1> $TFILE echo -e "$CALL\n$TO\n\n$SUBJECT" | $PAT compose 2>/dev/null 1> $TFILE
MSG="$(grep "MID:" $TFILE | tr -d ' \t' | cut -d':' -f3)" MSG="$(grep "MID:" $TFILE | tr -d ' \t' | cut -d':' -f3)"
[[ $MSG == "" ]] && Usage "Could not find the MID (Message ID)" [[ $MSG == "" ]] && Usage "Could not find the MID (Message ID)"
MSG="$OUTDIR/$MSG.b2f" MSG="$OUTDIR/$MSG.b2f"