The most obsolete SMS forwarder, "version 1.0"
authorshort <>
Tue, 10 Jul 2001 18:26:05 +0000 (18:26 +0000)
committershort <>
Tue, 10 Jul 2001 18:26:05 +0000 (18:26 +0000)
bin/smsnf [new file with mode: 0755]

diff --git a/bin/smsnf b/bin/smsnf
new file mode 100755 (executable)
index 0000000..f872edb
--- /dev/null
+++ b/bin/smsnf
@@ -0,0 +1,26 @@
+#!/bin/sh
+#num=431329
+#addr="http://sms.paegas.cz/wwwsms/index.phtml"
+maxlen=310 #316
+
+t=/tmp/smsnf.$$
+head -qc 4k >$t
+hd=`sed -n -e '/^\$/=' -e '/^\$/q' <$t`
+
+(echo -n "`
+head -n $hd $t|sed -n \
+-e 's/^Subject: *\(.*[^ ]\) *$/S:\1/p' \
+-e 's/^From: *\(.*[^ ]\) *$/F:\1/p'
+echo B:
+tail +$hd $t|sed -n \
+-e 's/^.*wr\(ote\|ites\):$//' \
+-e '/^[^>]/p'
+`"|tr '\n' ' '|sed 's/\([^ ]\) *\( [^ ]\)/\1\2/g' \
+|sed 's/^ *\([^ ].*\)/\1/'|sed 's/\(.*[^ ]\) *$/\1/') \
+|head -c $maxlen >$t.2
+
+#(echo -n "num=$num&text="
+#urlencode <$t.2
+#echo -e "\n---")|lynx -post_data $addr >/dev/null #>>~/Mail/smsn.out
+(echo -e "From: @.\n";cat $t.2)|/usr/sbin/sendmail jan.kratochvil@sms.paegas.cz
+rm -f $t $t.2