6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ShellからIPMessengerへ送信

Last updated at Posted at 2013-05-23

ShellからIPMessengerへ送信したいのですが、
IPMessengerへ送信出来ません。

どこか間違ってたら教えて下さい。

MESSAGE="HELLO WORLD"
USER="username"
HOST=`hostname -s` 
PACKET_NUMBER=`date +%s`
BODY="1:${PACKET_NUMBER}:${USER}:${HOST}:32:${MESSAGE}"

RECEIVER=192.168.0.1

# Open Socket
exec 5<>/dev/tcp/${RECEIVER}/2425 && echo "OK"
# Send message
echo -e ${BODY}>&5
6
6
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?