[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Split long message

From: Andrea Ganduglia
Subject: Split long message
Date: Sat, 24 Sep 2005 15:14:30 +0200

address@hidden, when I sent long message Gnokii sends only first 140bytes and
is ok. I wrote a little (and terribile) script to spilit message
before it was send.


#Input file ---

# Part x of n
FRASE='# Part XX of NN #'

# SMS size limit (bytes)

# The script

SOTTR=`echo ${#FRASE}`

split -b $SIZELIMIT -d $SMSTEXT part

LASTPART=`ls -1 part* | tail -1 | sed -e 's/part//g'`

for i in part*; do

        PARTHERE=`echo $i | sed -e 's/part//g'`

        ENDMSG=`echo $FRASE | sed -e "s/XX/$PARTHERE/g"`
        ENDMSG=`echo $ENDMSG | sed -e "s/NN/$LASTPART/g"`

        echo -n "$ENDMSG" >> $i

        # Here I WANT manipulate header of message
        cat $i | gnokii --sendsms <phonenumber>


In this way gnokii sends two or more sms, while I want it send one
message in two o more parts, that is two or more messages with
identical "Protocol Identifier".


-- - Idee per il software libero

reply via email to

[Prev in Thread] Current Thread [Next in Thread]