Diff for scripts/shell/sms/sity.sk/sms.sh between version 1.26 and 1.27
| version 1.26, 2002/06/25 17:08:19 |
version 1.27, 2002/06/26 10:52:53 |
| Line 24 TMP_FILE=`tempfile -p sms. -s .html \ |
|
| Line 24 TMP_FILE=`tempfile -p sms. -s .html \ |
|
| |
|
| if [ $# -lt 1 ]; then |
if [ $# -lt 1 ]; then |
| echo -e "Usage:\n $0 <number-or-alias>\n"; |
echo -e "Usage:\n $0 <number-or-alias>\n"; |
| echo "Message is taken from standart input. Use special characters with care."; |
echo -n "Message is taken from standart input." |
| |
echo " Use special characters with care."; |
| echo "Spaces are handled properly."; |
echo "Spaces are handled properly."; |
| exit 1; |
exit 1; |
| fi |
fi |
|
|
| echo 'Enter your message (max 420 chars, end with CTRL-D):'; |
echo 'Enter your message (max 420 chars, end with CTRL-D):'; |
| text=`cat` # text from stdin, multiple lines |
text=`cat` # text from stdin, multiple lines |
| text="`echo \"$text\" \ |
text="`echo \"$text\" \ |
| | awk 'BEGIN { ORS="+"} \ |
| awk 'BEGIN { ORS="+" } \ |
| { gsub(/%/, "%25"); \ |
{ gsub(/%/, "%25"); \ |
| gsub(/\+/, "%2B"); \ |
gsub(/\+/, "%2B"); \ |
| gsub(/ /, "+"); \ |
gsub(/ /, "+"); \ |
| gsub(/\&/, "%26"); \ |
gsub(/\&/, "%26"); \ |
| print; }'`" |
print; }'`" |
| # }}} |
# }}} |
Platon Group <platon@platon.org> http://platon.org/
|
|