Skip to content

Instantly share code, notes, and snippets.

@fwolf
Last active August 29, 2015 14:21
Show Gist options
  • Save fwolf/e05deecad2abe1430feb to your computer and use it in GitHub Desktop.
Save fwolf/e05deecad2abe1430feb to your computer and use it in GitHub Desktop.
Send message with telegram-cli
#!/bin/bash
# Usage:
# Only first line of output
# ./tg.sh 用户昵称或群组名称(空格用_替代) "$(w)"
# Or combile multiple line to one
# ./tg.sh 昵称 $(w)
#
# 要求对方用户在联系人目录中,或者 group 有对话记录(空的也行)
# Note: the -W does'nt work now
#echo $*
(
echo "dialog_list"
sleep 10
echo "msg $*"
sleep 1
echo "safe_quit"
) | telegram-cli -W
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment