Код: Выделить всё
$ echo "PRIVET" | megaicqclient --to 123456 --login 10000 --p pass --server server.aol

Код: Выделить всё
$ echo "PRIVET" | megaicqclient --to 123456 --login 10000 --p pass --server server.aol
Код: Выделить всё
Sending events
In fact, it's not really sending. CenterIM just allows you to put an event to the outgoing queue from another process with command line options. To have the event sent immediately CenterIM must be running, otherwise all of your queued events will be sent as soon as the program is launched and connected to the corresponding IM network.
The following command line options are used to put an event to the outgoing queue:
-s or --send <event type>
This parameter specifies the type of event you want to send.
Currently only "msg", "url" and "sms" are supported.
-p or --proto <protocol type>
This one specifies to which IM network the destination contact
belongs to. Can be either "icq", "yahoo", "aim", "irc", "jab"
or "lj".
-t or --to
With this one you specify nickname or UIN of the destination
contact. For icq it's possible to specify 0 to send events to
yourself. Only SMSes are known to be possible to be sent to oneself
though.
-n or --number
Using this parameter you can send SMSes to any mobile numbers
through the ICQ network.
The message text is read from the standard input, so use pipes in shell to pass it. For example, you can say "hi" to me through the ICQ network with the following command:
$ echo "hi" | centerim -s msg -p icq -t 17502151
In case you want to send an URL, the URL itself and its description are separated with a newline character the following way:
$ echo -e "http://thekonst.net/\nMy modest homepage." | CenterIM -s url -p icq -t 17502151
Finally, a small example of sending SMSes:
$ echo "sms test" | centerim -s sms -n 1234567890
Please note, that all three parameters are required in order to queue an event.